brainy/src/global.d.ts
David Snelling 3dce27e951 **feat: add global type declarations for environment detection**
### Changes:
- Introduced `global.d.ts` to define global type declarations for the `globalThis` interface.
- Added `__ENV__` object with the following properties:
  - `isBrowser: boolean`
  - `isNode: string | false`
  - `isServerless: boolean`
- Included an export statement to ensure the file is treated as a module.

### Purpose:
Defined global environment properties to standardize and enhance environment detection across browser, Node.js, and serverless environments. This improves type safety and consistency in the codebase.
2025-06-20 10:56:37 -07:00

15 lines
299 B
TypeScript

/**
* Global type declarations for Brainy
*/
// Extend the globalThis interface to include the __ENV__ property
declare global {
var __ENV__: {
isBrowser: boolean;
isNode: string | false;
isServerless: boolean;
};
}
// This export is needed to make this file a module
export {};