Skip to content

Instantly share code, notes, and snippets.

@otonii
Created October 13, 2023 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otonii/38dce86bda14a6b2857ab0046860e100 to your computer and use it in GitHub Desktop.
Save otonii/38dce86bda14a6b2857ab0046860e100 to your computer and use it in GitHub Desktop.
typescript cheat sheet
{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ES2022",
"verbatimModuleSyntax": true,
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
/* Strictness */
"strict": true,
"noUncheckedIndexedAccess": true,
/* If transpiling with TypeScript: */
"moduleResolution": "NodeNext",
"module": "NodeNext",
"outDir": "dist",
"sourceMap": true,
/* If NOT transpiling with TypeScript: */
"moduleResolution": "Bundler",
"module": "ESNext",
"noEmit": true,
/* If your code runs in DOM: */
"lib": ["DOM", "DOM.Iterable", "ES2022"],
/* If your code doesn't run in the DOM: */
"lib": ["ES2022"],
/* If you're building for a library: */
"declaration": true,
/* If you're building for a library in a monorepo: */
"composite": true,
"declarationMap": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment