This package provides pre-configured settings for using TypeScript in Nexim projects.
Install the package as a development dependency:
yarn add -D @nexim/typescript-config
To use this configuration, create a tsconfig.json
file in the root of your project and extend one of the provided configurations:
This configuration contains the fundamental settings shared by all other configurations. It's generally not used directly, but serves as the foundation for other, more specific configurations.
Use this configuration for browser-based applications. It extends the base configuration and is primarily used for type checking during development. It doesn't produce build outputs.
{
"extends": "@nexim/typescript-config/tsconfig.browser.app.json",
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
}
Use this configuration for browser-based libraries. extends the base configuration, generates declaration files (*.d.ts), and supports referencing other projects.
{
"extends": "@nexim/typescript-config/tsconfig.browser.lib.json",
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
}
Use this configuration for nodejs-based applications. It extends the base configuration and includes Node.js specific type definitions. It doesn't produce build outputs and primarily used for type checking during development.
{
"extends": "@nexim/typescript-config/tsconfig.node.app.json",
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
}
Use this configuration for nodejs-based libraries. extends the base configuration, incorporates Node.js type definitions, generates declaration files (*.d.ts), and supports referencing other projects.
{
"extends": "@nexim/typescript-config/tsconfig.node.lib.json",
"include": ["src/**/*.ts", "src/*.ts"] // Include all TypeScript files in your source directory
}