UNPKG

@tsconfig/node-ts

Version:

A base TSConfig for working with Node with TypeScript (TS >=5.8 ONLY).

48 lines (35 loc) 1.33 kB
### A base TSConfig for working with Node with TypeScript (TS >=5.8 ONLY). Add the package to your `"devDependencies"`: ```sh npm install --save-dev @tsconfig/node-ts yarn add --dev @tsconfig/node-ts ``` Add to your `tsconfig.json`: ```json "extends": "@tsconfig/node-ts/tsconfig.json" ``` > This base require TypeScript 5.8+ (See [announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option)) This file is meant to be used in conjunction with other Node.js configurations, you can do so by extending multiple files in the `extends` clause of your `tsconfig.json`: ```json { "extends": ["@tsconfig/node22/tsconfig.json", "@tsconfig/node-ts/tsconfig.json"] } ``` --- The `tsconfig.json`: ```jsonc { "$schema": "https://json.schemastore.org/tsconfig", "docs": [ "https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/#path-rewriting-for-relative-paths", "https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option" ], "_version": "23.6.0", "compilerOptions": { "rewriteRelativeImportExtensions": true, "erasableSyntaxOnly": true, "verbatimModuleSyntax": true } } ``` You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node-ts.json).