A collection of useful TypeScript type helpers.
yarn add -D @alwatr/type-helper
import type {JSONObject} from '@alwatr/type-helper/types';
To add the type helpers to your global types, update your tsconfig.json
:
{
"extends": "@alwatr/tsconfig-base/tsconfig.json",
"compilerOptions": {
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
},
"include": ["src/**/*.ts"],
"references": [{"path": "../package-tracer"}]
}
const obj: JSONObject = {
foo: 'bar',
baz: {
qux: 1,
arr: [1, 2, 3],
},
qux: true,
};
Read the source code for more details.
The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.
Contributions are welcome! Please read our contribution guidelines before submitting a pull request.
This project is licensed under the AGPL-3.0 License.