You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the tsconfig.json directly used by the TypeScript project does not explicitly set declaration to true, even if its parent does, then gulp-typescript does not generate declaration files, unlike the inline compiler tsc.
I use gulp-typescript version 3.1.7 and TypeScript 2.4.1.
{
"include": [ "./src/**/*.ts" ],
"compilerOptions": {
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"removeComments": true, /* Do not emit comments to output. */
"strict": true, /* Enable all strict type-checking options. */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */
}
}
To solve this issue, we need to explicitely set declaration to true in the createProject() method, or repeat "declaration": true in the inherited tsconfig.json (here, tsconfig.debug.json).
When the tsconfig.json directly used by the TypeScript project does not explicitly set
declaration
totrue
, even if its parent does, then gulp-typescript does not generate declaration files, unlike the inline compilertsc
.I use gulp-typescript version 3.1.7 and TypeScript 2.4.1.
Here is the gulpfile.js:
Above, the parameter
config
in thecreateProject()
method refers to the following tsconfig.debug.json:Here is its parent, tsconfig.json:
To solve this issue, we need to explicitely set
declaration
totrue
in thecreateProject()
method, or repeat"declaration": true
in the inherited tsconfig.json (here, tsconfig.debug.json).This issue refers to this one: #231
The text was updated successfully, but these errors were encountered: