Skip to content

Commit f4a643f

Browse files
Update LKG.
1 parent 53105b3 commit f4a643f

6 files changed

+6
-6
lines changed

lib/tsc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25919,7 +25919,7 @@ var ts;
2591925919
}
2592025920
function checkResolvedBlockScopedVariable(result, errorLocation) {
2592125921
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); });
2592325923
if (declaration === undefined)
2592425924
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
2592525925
if (!(declaration.flags & 4194304) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {

lib/tsserver.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31759,7 +31759,7 @@ var ts;
3175931759
function checkResolvedBlockScopedVariable(result, errorLocation) {
3176031760
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
3176131761
// 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); });
3176331763
if (declaration === undefined)
3176431764
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
3176531765
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {

lib/tsserverlibrary.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31755,7 +31755,7 @@ var ts;
3175531755
function checkResolvedBlockScopedVariable(result, errorLocation) {
3175631756
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
3175731757
// 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); });
3175931759
if (declaration === undefined)
3176031760
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
3176131761
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {

lib/typescript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31746,7 +31746,7 @@ var ts;
3174631746
function checkResolvedBlockScopedVariable(result, errorLocation) {
3174731747
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
3174831748
// 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); });
3175031750
if (declaration === undefined)
3175131751
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
3175231752
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {

lib/typescriptServices.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31746,7 +31746,7 @@ var ts;
3174631746
function checkResolvedBlockScopedVariable(result, errorLocation) {
3174731747
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
3174831748
// 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); });
3175031750
if (declaration === undefined)
3175131751
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
3175231752
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {

lib/typingsInstaller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31759,7 +31759,7 @@ var ts;
3175931759
function checkResolvedBlockScopedVariable(result, errorLocation) {
3176031760
ts.Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */));
3176131761
// 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); });
3176331763
if (declaration === undefined)
3176431764
return ts.Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined");
3176531765
if (!(declaration.flags & 4194304 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {

0 commit comments

Comments
 (0)