Skip to content

Instantly share code, notes, and snippets.

@itsgitz
Last active November 25, 2024 05:33
Show Gist options
  • Save itsgitz/437999e4399493ccd2dba08d86fef77f to your computer and use it in GitHub Desktop.
Save itsgitz/437999e4399493ccd2dba08d86fef77f to your computer and use it in GitHub Desktop.
Best recommendation of TypeScript Configuration (tsconfig.json)
{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"verbatimModuleSyntax": true,
/* Strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
/* If transpiling with TypeScript: */
"module": "NodeNext",
"outDir": "dist",
"sourceMap": true,
/* AND if you're building for a library: */
"declaration": true,
/* AND if you're building for a library in a monorepo: */
"composite": true,
"declarationMap": true,
/* If NOT transpiling with TypeScript: */
"module": "preserve",
"noEmit": true,
/* If your code runs in the DOM: */
"lib": ["es2022", "dom", "dom.iterable"],
/* If your code doesn't run in the DOM: */
"lib": ["es2022"]
}
}
@itsgitz
Copy link
Author

itsgitz commented Nov 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment