Global type definitions for Tsonic with BCL primitive methods
npm install @tsonic/globalsGlobal type definitions for Tsonic.
This package provides:
1. Base types required by TypeScript (Array, String, Object, Function, etc.)
2. Shared types used by both modes (utility types, iterators, Promise, Symbol)
``bash`
npm install @tsonic/globals
`json`
{
"compilerOptions": {
"noLib": true,
"typeRoots": ["node_modules/@tsonic/globals"]
}
}
Arrays use LINQ, strings use BCL methods.
`bash`
npm install @tsonic/globals @tsonic/js-globals
`json`
{
"compilerOptions": {
"noLib": true,
"typeRoots": [
"node_modules/@tsonic/globals",
"node_modules/@tsonic/js-globals"
]
}
}
Arrays have .map, .filter, .length, etc. Strings have .slice, .indexOf, etc.
, ReadonlyArray - indexer and iterator only
- String, Number, Boolean - empty base
- Object, Function - minimal
- RegExp, IArguments, CallableFunction, NewableFunction$3
- Partial, Required, Readonly, Pick, Omit
- Record, Exclude, Extract, NonNullable
- Parameters, ReturnType, InstanceType, ConstructorParameters$3
- Iterator, IteratorResult, Iterable, IterableIterator
- AsyncIterator, AsyncIterable, AsyncIterableIterator
- Generator, AsyncGenerator$3
- Promise, PromiseLike, PromiseConstructor$3
- Symbol, SymbolConstructor
- PropertyKey
- Template literal utilities: Uppercase, Lowercase, Capitalize, Uncapitalize`MIT