Skip to content

Commit 9fad505

Browse files
committed
Merge branch 'master' into pedanticPropertyLookup
2 parents 3a1e53b + 62a86ec commit 9fad505

File tree

838 files changed

+23977
-6532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

838 files changed

+23977
-6532
lines changed

.github/workflows/sync-branch.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- uses: actions/checkout@v2
2222
with:
2323
ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }}
24+
fetch-depth: 0
2425
# This does a test post-merge and only pushes the result if the test succeeds
2526
# required client_payload members:
2627
# branch_name - the target branch

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob
3333
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
3434
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
3535
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md).
36-
* Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
37-
[pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md)).
36+
* Read the archived language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.docx?raw=true),
37+
[pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec-archived.md)).
3838

3939
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
4040
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected])

package-lock.json

Lines changed: 47 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/produceLKG.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ async function produceLKG() {
1515
await copyLibFiles();
1616
await copyLocalizedDiagnostics();
1717
await copyTypesMap();
18-
await buildProtocol();
1918
await copyScriptOutputs();
2019
await copyDeclarationOutputs();
20+
await buildProtocol();
2121
await writeGitAttributes();
2222
}
2323

src/compiler/binder.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,14 @@ namespace ts {
174174
const binder = createBinder();
175175

176176
export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
177+
tracing.begin(tracing.Phase.Bind, "bindSourceFile", { path: file.path });
177178
performance.mark("beforeBind");
178179
perfLogger.logStartBindFile("" + file.fileName);
179180
binder(file, options);
180181
perfLogger.logStopBindFile();
181182
performance.mark("afterBind");
182183
performance.measure("Bind", "beforeBind", "afterBind");
184+
tracing.end();
183185
}
184186

185187
function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
@@ -2806,9 +2808,9 @@ namespace ts {
28062808
return symbol;
28072809
});
28082810
if (symbol) {
2809-
const flags = isClassExpression(node.right) ?
2810-
SymbolFlags.Property | SymbolFlags.ExportValue | SymbolFlags.Class :
2811-
SymbolFlags.Property | SymbolFlags.ExportValue;
2811+
const isAlias = isAliasableExpression(node.right) && (isExportsIdentifier(node.left.expression) || isModuleExportsAccessExpression(node.left.expression));
2812+
const flags = isAlias ? SymbolFlags.Alias : SymbolFlags.Property | SymbolFlags.ExportValue;
2813+
setParent(node.left, node);
28122814
declareSymbol(symbol.exports!, symbol, node.left, flags, SymbolFlags.None);
28132815
}
28142816
}

src/compiler/builder.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ namespace ts {
493493
return !state.semanticDiagnosticsFromOldState.size;
494494
}
495495

496-
function isChangedSignagure(state: BuilderProgramState, path: Path) {
496+
function isChangedSignature(state: BuilderProgramState, path: Path) {
497497
const newSignature = Debug.checkDefined(state.currentAffectedFilesSignatures).get(path);
498-
const oldSignagure = Debug.checkDefined(state.fileInfos.get(path)).signature;
499-
return newSignature !== oldSignagure;
498+
const oldSignature = Debug.checkDefined(state.fileInfos.get(path)).signature;
499+
return newSignature !== oldSignature;
500500
}
501501

502502
/**
@@ -509,7 +509,7 @@ namespace ts {
509509
return;
510510
}
511511

512-
if (!isChangedSignagure(state, affectedFile.resolvedPath)) return;
512+
if (!isChangedSignature(state, affectedFile.resolvedPath)) return;
513513

514514
// Since isolated modules dont change js files, files affected by change in signature is itself
515515
// But we need to cleanup semantic diagnostics and queue dts emit for affected files
@@ -522,7 +522,7 @@ namespace ts {
522522
if (!seenFileNamesMap.has(currentPath)) {
523523
seenFileNamesMap.set(currentPath, true);
524524
const result = fn(state, currentPath);
525-
if (result && isChangedSignagure(state, currentPath)) {
525+
if (result && isChangedSignature(state, currentPath)) {
526526
const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath)!;
527527
queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));
528528
}

0 commit comments

Comments
 (0)