Skip to content
Search

TypeScript:TypeDeclarations

lastmod 2022-04-15created 2022-04-1411 edits

Categories

Webpack plugins

When using ts-loader

Type Checking and d.ts file generation

When running tsc, add the following to tsconfig.json

"compilerOptions": {
  // Ensure that .d.ts files are created by tsc, but not .js files
  "declaration": true,
  "emitDeclarationOnly": true,
  // Ensure that Babel can safely transpile files in the TypeScript project
  "isolatedModules": true
}

Favorite site

author Zer0 sitemap