We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3ba3aa commit 2466109Copy full SHA for 2466109
1 file changed
src/compiler/emitter.ts
@@ -411,7 +411,11 @@ namespace ts {
411
}
412
);
413
if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === SyntaxKind.SourceFile) {
414
- const sourceFile = declarationTransform.transformed[0] as SourceFile;
+ // Improved narrowing in master/3.6 makes this cast unnecessary, triggering a lint rule.
415
+ // But at the same time, the LKG (3.5) necessitates it because it doesn’t narrow.
416
+ // Once the LKG is updated to 3.6, this comment, the cast to `SourceFile`, and the
417
+ // tslint directive can be all be removed.
418
+ const sourceFile = declarationTransform.transformed[0] as SourceFile; // tslint:disable-line
419
exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
420
421
0 commit comments