File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2122,7 +2122,7 @@ namespace ts {
2122
2122
}
2123
2123
}
2124
2124
if (!result) {
2125
- if (nameNotFoundMessage) {
2125
+ if (nameNotFoundMessage && produceDiagnostics ) {
2126
2126
if (!errorLocation ||
2127
2127
!checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg!) && // TODO: GH#18217
2128
2128
!checkAndReportErrorForExtendingInterface(errorLocation) &&
@@ -2172,7 +2172,7 @@ namespace ts {
2172
2172
}
2173
2173
2174
2174
// Perform extra checks only if error reporting was requested
2175
- if (nameNotFoundMessage) {
2175
+ if (nameNotFoundMessage && produceDiagnostics ) {
2176
2176
if (propertyWithInvalidInitializer && !(getEmitScriptTarget(compilerOptions) === ScriptTarget.ESNext && useDefineForClassFields)) {
2177
2177
// We have a match, but the reference occurred within a property initializer and the identifier also binds
2178
2178
// to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
@@ -28816,7 +28816,8 @@ namespace ts {
28816
28816
return candidateName;
28817
28817
}
28818
28818
28819
- if (candidate.flags & SymbolFlags.Alias) {
28819
+ // Don't try to resolve aliases if global types aren't initialized yet
28820
+ if (globalObjectType && candidate.flags & SymbolFlags.Alias) {
28820
28821
const alias = tryResolveAlias(candidate);
28821
28822
if (alias && alias.flags & meaning) {
28822
28823
return candidateName;
You can’t perform that action at this time.
0 commit comments