- **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.
54 lines
1.3 KiB
TypeScript
54 lines
1.3 KiB
TypeScript
/**
|
|
* 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 {}
|