File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2122,7 +2122,7 @@ namespace ts {
21222122 }
21232123 }
21242124 if (!result) {
2125- if (nameNotFoundMessage) {
2125+ if (nameNotFoundMessage && produceDiagnostics ) {
21262126 if (!errorLocation ||
21272127 !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg!) && // TODO: GH#18217
21282128 !checkAndReportErrorForExtendingInterface(errorLocation) &&
@@ -2172,7 +2172,7 @@ namespace ts {
21722172 }
21732173
21742174 // Perform extra checks only if error reporting was requested
2175- if (nameNotFoundMessage) {
2175+ if (nameNotFoundMessage && produceDiagnostics ) {
21762176 if (propertyWithInvalidInitializer && !(getEmitScriptTarget(compilerOptions) === ScriptTarget.ESNext && useDefineForClassFields)) {
21772177 // We have a match, but the reference occurred within a property initializer and the identifier also binds
21782178 // 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 {
2881628816 return candidateName;
2881728817 }
2881828818
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) {
2882028821 const alias = tryResolveAlias(candidate);
2882128822 if (alias && alias.flags & meaning) {
2882228823 return candidateName;
You can’t perform that action at this time.
0 commit comments