Fix build/lint due to differences in master and LKG (#32450)
This commit is contained in:
parent
e3ba3aacc8
commit
2466109577
1 changed files with 5 additions and 1 deletions
|
@ -411,7 +411,11 @@ namespace ts {
|
|||
}
|
||||
);
|
||||
if (emitOnlyDtsFiles && declarationTransform.transformed[0].kind === SyntaxKind.SourceFile) {
|
||||
const sourceFile = declarationTransform.transformed[0] as SourceFile;
|
||||
// Improved narrowing in master/3.6 makes this cast unnecessary, triggering a lint rule.
|
||||
// But at the same time, the LKG (3.5) necessitates it because it doesn’t narrow.
|
||||
// Once the LKG is updated to 3.6, this comment, the cast to `SourceFile`, and the
|
||||
// tslint directive can be all be removed.
|
||||
const sourceFile = declarationTransform.transformed[0] as SourceFile; // tslint:disable-line
|
||||
exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue