Global type definitions for Tsonic.
This repo is versioned by .NET major:
- .NET 10 →
versions/10/→ npm:@tsonic/globals@10.x
When publishing, run: npm publish versions/10 --access public
This package provides the CLR/default-surface global type layer:
- Base types required by TypeScript (Array, String, Object, Function, etc.)
- Shared types used by the CLR/default surface (utility types, iterators, Promise, Symbol)
npm install @tsonic/globals{
"compilerOptions": {
"noLib": true,
"typeRoots": ["node_modules/@tsonic/globals"]
}
}Arrays use LINQ, strings use BCL methods.
Do not layer @tsonic/globals and @tsonic/js-globals manually for JS projects.
Use the first-party JS surface directly:
npx --yes tsonic@latest init --surface @tsonic/js@tsonic/js provides its own surface and ambient globals. @tsonic/js-globals is retired.
Array<T>,ReadonlyArray<T>- indexer and iterator onlyString,Number,Boolean- empty baseObject,Function- minimalRegExp,IArguments,CallableFunction,NewableFunction
Partial,Required,Readonly,Pick,OmitRecord,Exclude,Extract,NonNullableParameters,ReturnType,InstanceType,ConstructorParameters
Iterator,IteratorResult,Iterable,IterableIteratorAsyncIterator,AsyncIterable,AsyncIterableIteratorGenerator,AsyncGenerator
Promise,PromiseLike,PromiseConstructor
Symbol,SymbolConstructorPropertyKey- Template literal utilities:
Uppercase,Lowercase,Capitalize,Uncapitalize
MIT