Skip to content

TypeScript:TypeDeclarations

Categories

Webpack plugins

ts-loader 사용시

Type Checking and d.ts file generation

tsc 실행시 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