Skip to content

Commit c3c80b7

Browse files
committed
Address CR comments
1 parent 5780d3b commit c3c80b7

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15213,7 +15213,7 @@ namespace ts {
1521315213
}
1521415214
else {
1521515215
const parent = node.parent as SourceFile;
15216-
// Note: missing external module indicator case checked in binder
15216+
// Note: the binder handles the case where the declaration isn't in an external module
1521715217
if (parent.externalModuleIndicator && !parent.isDeclarationFile) {
1521815218
error(node, Diagnostics.Global_module_exports_may_only_appear_in_declaration_files);
1521915219
}

src/compiler/parser.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4609,7 +4609,6 @@ namespace ts {
46094609
case SyntaxKind.EnumKeyword:
46104610
return parseEnumDeclaration(fullStart, decorators, modifiers);
46114611
case SyntaxKind.GlobalKeyword:
4612-
return parseModuleDeclaration(fullStart, decorators, modifiers);
46134612
case SyntaxKind.ModuleKeyword:
46144613
case SyntaxKind.NamespaceKeyword:
46154614
return parseModuleDeclaration(fullStart, decorators, modifiers);

src/compiler/program.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,9 @@ namespace ts {
13761376
}
13771377
}
13781378

1379+
/**
1380+
* 'isReference' indicates whether the file was brought in via a reference directive (rather than an import declaration)
1381+
*/
13791382
function processSourceFile(fileName: string, isDefaultLib: boolean, isReference: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) {
13801383
let diagnosticArgument: string[];
13811384
let diagnostic: DiagnosticMessage;

src/compiler/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ namespace ts {
15451545
// The first node that causes this file to be a CommonJS module
15461546
/* @internal */ commonJsModuleIndicator: Node;
15471547
// True if the file was a root file in a compilation or a /// reference targets
1548-
wasReferenced?: boolean;
1548+
/* @internal */ wasReferenced?: boolean;
15491549

15501550
/* @internal */ identifiers: Map<string>;
15511551
/* @internal */ nodeCount: number;

0 commit comments

Comments
 (0)