File tree 6 files changed +6
-6
lines changed
6 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -25919,7 +25919,7 @@ var ts;
25919
25919
}
25920
25920
function checkResolvedBlockScopedVariable(result, errorLocation) {
25921
25921
ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384));
25922
- var declaration = ts.forEach (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241) ? d : undefined ; });
25922
+ var declaration = ts.find (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d) ; });
25923
25923
if (declaration === undefined)
25924
25924
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
25925
25925
if (!(declaration.flags & 4194304) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
Original file line number Diff line number Diff line change @@ -31759,7 +31759,7 @@ var ts;
31759
31759
function checkResolvedBlockScopedVariable(result, errorLocation) {
31760
31760
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
31761
31761
// Block-scoped variables cannot be used before their definition
31762
- var declaration = ts.forEach (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) ? d : undefined ; });
31762
+ var declaration = ts.find (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d) ; });
31763
31763
if (declaration === undefined)
31764
31764
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
31765
31765
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
Original file line number Diff line number Diff line change @@ -31755,7 +31755,7 @@ var ts;
31755
31755
function checkResolvedBlockScopedVariable(result, errorLocation) {
31756
31756
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
31757
31757
// Block-scoped variables cannot be used before their definition
31758
- var declaration = ts.forEach (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) ? d : undefined ; });
31758
+ var declaration = ts.find (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d) ; });
31759
31759
if (declaration === undefined)
31760
31760
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
31761
31761
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
Original file line number Diff line number Diff line change @@ -31746,7 +31746,7 @@ var ts;
31746
31746
function checkResolvedBlockScopedVariable(result, errorLocation) {
31747
31747
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
31748
31748
// Block-scoped variables cannot be used before their definition
31749
- var declaration = ts.forEach (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) ? d : undefined ; });
31749
+ var declaration = ts.find (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d) ; });
31750
31750
if (declaration === undefined)
31751
31751
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
31752
31752
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
Original file line number Diff line number Diff line change @@ -31746,7 +31746,7 @@ var ts;
31746
31746
function checkResolvedBlockScopedVariable(result, errorLocation) {
31747
31747
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
31748
31748
// Block-scoped variables cannot be used before their definition
31749
- var declaration = ts.forEach (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) ? d : undefined ; });
31749
+ var declaration = ts.find (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d) ; });
31750
31750
if (declaration === undefined)
31751
31751
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
31752
31752
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
Original file line number Diff line number Diff line change @@ -31759,7 +31759,7 @@ var ts;
31759
31759
function checkResolvedBlockScopedVariable(result, errorLocation) {
31760
31760
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
31761
31761
// Block-scoped variables cannot be used before their definition
31762
- var declaration = ts.forEach (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) ? d : undefined ; });
31762
+ var declaration = ts.find (result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 241 /* EnumDeclaration */) || ts.isInJSFile(d) && !!ts.getJSDocEnumTag(d) ; });
31763
31763
if (declaration === undefined)
31764
31764
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
31765
31765
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
You can’t perform that action at this time.
0 commit comments