Some comments and suggestions:<p>- `importsNotUsedAsValues` is deprecated [0] since TypeScript 5.2, in favor of `verbatimModuleSyntax` [1].<p>- I could set `module` to `Node16`. This automatically set `esModuleInterop` to true.<p>- Also, to catch more issues, set `allowUnreachableCode` to false and set `strict`, `noImplicitReturns`, `noImplicitOverride`, `noFallthroughCasesInSwitch`, `exactOptionalPropertyTypes` to true.<p>- Set `types` to the empty array `[]` to avoid loading unwanted types.<p>- Enable `skipLibCheck` to avoid checking imported module types.<p>- Not sure that `declarationMap` is still useful nowadays. TypeScript is now able to match directly against source files.<p>- Enable `composite` that in turns enables `incremental` and `declaration` (declaration file emit). `composite` enables project references which is useful in a monorepo setting or to separate source and test files into two projects. See [2]<p>- Enable `checkJs` to type-check JavaScript files<p>To summarize:<p><pre><code> {
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"lib": ["ES2022"],
"module": "Node16",
"target": "ES2022",
"outDir": "./dist",
"composite": true,
"sourceMap": true,
"types": [],
"isolatedModules": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"verbatimModuleSyntax": true,
"allowUnreachableCode": false,
"checkJs": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"strict": true
}
"include": ["./src/**/*.ts"],
"exclude": ["./src/specific-file.ts"]
}
</code></pre>
[0] <a href="https://www.typescriptlang.org/tsconfig#importsNotUsedAsValues" rel="nofollow noreferrer">https://www.typescriptlang.org/tsconfig#importsNotUsedAsValu...</a><p>[1] <a href="https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax" rel="nofollow noreferrer">https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax</a><p>[2] <a href="https://www.typescriptlang.org/docs/handbook/project-references.html" rel="nofollow noreferrer">https://www.typescriptlang.org/docs/handbook/project-referen...</a>