**docs: remove outdated statistics-related documentation and add standards**

- **Removed Files**:
  - Deleted outdated statistics documentation files (`statistics.md`, `statistics-flush-solution.md`, `statistics-summary.md`) to clean up the repository and avoid confusion.

- **Added Standards**:
  - Introduced `DOCUMENTATION_STANDARDS.md` to outline naming conventions and troubleshooting practices for more consistent and maintainable project documentation.

- **Tests**:
  - Added a new test file `edge-cases.test.ts` to verify handling of edge cases, ensuring robust behavior against boundary values and invalid inputs.

**Purpose**: Cleans up deprecated documentation while introducing concrete standards for maintaining and updating documentation. Enhances test coverage for unusual or boundary inputs, improving overall system resilience.
This commit is contained in:
David Snelling 2025-07-28 16:00:05 -07:00
parent 3337c9f78e
commit 94c88e128c
41 changed files with 5583 additions and 498 deletions

54
src/types/global.d.ts vendored Normal file
View file

@ -0,0 +1,54 @@
/**
* Global type declarations for Brainy
*/
import { TensorFlowUtilObject } from './tensorflowTypes'
declare global {
// These declarations are needed for the project
// eslint-disable-next-line no-var
var __vitest__: any
// eslint-disable-next-line no-var
var __TextEncoder__: typeof TextEncoder
// eslint-disable-next-line no-var
var __TextDecoder__: typeof TextDecoder
// eslint-disable-next-line no-var
var __brainy_util__: any
// eslint-disable-next-line no-var
var _utilShim: any
// eslint-disable-next-line no-var
var __utilShim: any
namespace NodeJS {
interface Global {
util?: TensorFlowUtilObject
TextDecoder?: typeof TextDecoder
TextEncoder?: typeof TextEncoder
}
}
// Add compatibility for TextDecoder in utils
interface TextDecoderOptions {
fatal?: boolean
ignoreBOM?: boolean
}
interface TextDecodeOptions {
stream?: boolean
}
interface TextDecoder {
readonly encoding: string
readonly fatal: boolean
readonly ignoreBOM: boolean
decode(input?: ArrayBuffer | ArrayBufferView | null, options?: TextDecodeOptions): string
}
interface TextEncoder {
readonly encoding: string
encode(input?: string): Uint8Array
encodeInto(input: string, output: Uint8Array): { read: number, written: number }
}
}
export {}

View file

@ -35,15 +35,4 @@ declare global {
interface WorkerGlobalScope {
importTensorFlow?: () => Promise<any>
}
// Declare types for the global object and globalThis
var global: {
util?: TensorFlowUtilObject
[key: string]: any
}
var globalThis: {
util?: TensorFlowUtilObject
[key: string]: any
}
}