Don’t issue used-before-initialization errors in declaration files (#32579)

This commit is contained in:
Andrew Branch
2019-08-01 11:24:04 -07:00
committed by GitHub
parent 73bef22f0b
commit 33f362abaf
4 changed files with 63 additions and 1 deletions

View File

@@ -20700,7 +20700,7 @@ namespace ts {
function checkPropertyNotUsedBeforeDeclaration(prop: Symbol, node: PropertyAccessExpression | QualifiedName, right: Identifier): void {
const { valueDeclaration } = prop;
if (!valueDeclaration) {
if (!valueDeclaration || getSourceFileOfNode(node).isDeclarationFile) {
return;
}