Skip to content

Commit 5ad8532

Browse files
committed
Merge branch 'master' into fix37113
# Conflicts: # src/compiler/transformers/module/module.ts
2 parents ae2f006 + 2c08aff commit 5ad8532

File tree

1,219 files changed

+4107
-2213
lines changed

Some content is hidden

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

1,219 files changed

+4107
-2213
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
node-version: [10.x, 12.x, 13.x]
2020

2121
steps:
22-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v2
2323
with:
2424
fetch-depth: 5
2525
- name: Use node version ${{ matrix.node-version }}
@@ -45,4 +45,4 @@ jobs:
4545

4646
- name: Validate the browser can import TypeScript
4747
run: gulp test-browser-integration
48-
48+

.github/workflows/nightly.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Publish Nightly
33
on:
44
schedule:
55
- cron: '0 7 * * *'
6+
# enable users to manually trigger with workflow_dispatch
7+
workflow_dispatch: {}
68
repository_dispatch:
79
types: publish-nightly
810

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ TypeScript is currently accepting contributions in the form of bug fixes. A bug
6363

6464
## Contributing features
6565

66-
Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog" milestone) by a TypeScript project maintainer) in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted.
66+
Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog" milestone) by a TypeScript project maintainer in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted.
6767

6868
Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue.
6969

src/compat/deprecations.ts

+20
Original file line numberDiff line numberDiff line change
@@ -1321,4 +1321,24 @@ namespace ts {
13211321
});
13221322

13231323
// #endregion Renamed node Tests
1324+
1325+
// DEPRECATION: Renamed `Map` and `ReadonlyMap` interfaces
1326+
// DEPRECATION PLAN:
1327+
// - soft: 4.0
1328+
// - remove: TBD (will remove for at least one release before replacing with `ESMap`/`ReadonlyESMap`)
1329+
// - replace: TBD (will eventually replace with `ESMap`/`ReadonlyESMap`)
1330+
// #region Renamed `Map` and `ReadonlyMap` interfaces
1331+
1332+
/**
1333+
* @deprecated Use `ts.ReadonlyESMap<K, V>` instead.
1334+
*/
1335+
export interface ReadonlyMap<T> extends ReadonlyESMap<string, T> {
1336+
}
1337+
1338+
/**
1339+
* @deprecated Use `ts.ESMap<K, V>` instead.
1340+
*/
1341+
export interface Map<T> extends ESMap<string, T> { }
1342+
1343+
// #endregion
13241344
}

src/compiler/binder.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ namespace ts {
218218
let symbolCount = 0;
219219

220220
let Symbol: new (flags: SymbolFlags, name: __String) => Symbol;
221-
let classifiableNames: UnderscoreEscapedMap<true>;
221+
let classifiableNames: Set<__String>;
222222

223223
const unreachableFlow: FlowNode = { flags: FlowFlags.Unreachable };
224224
const reportedUnreachableFlow: FlowNode = { flags: FlowFlags.Unreachable };
@@ -237,7 +237,7 @@ namespace ts {
237237
options = opts;
238238
languageVersion = getEmitScriptTarget(options);
239239
inStrictMode = bindInStrictMode(file, opts);
240-
classifiableNames = createUnderscoreEscapedMap<true>();
240+
classifiableNames = new Set();
241241
symbolCount = 0;
242242

243243
Symbol = objectAllocator.getSymbolConstructor();
@@ -445,7 +445,7 @@ namespace ts {
445445
symbol = symbolTable.get(name);
446446

447447
if (includes & SymbolFlags.Classifiable) {
448-
classifiableNames.set(name, true);
448+
classifiableNames.add(name);
449449
}
450450

451451
if (!symbol) {
@@ -1965,7 +1965,7 @@ namespace ts {
19651965
}
19661966

19671967
if (inStrictMode && !isAssignmentTarget(node)) {
1968-
const seen = createUnderscoreEscapedMap<ElementKind>();
1968+
const seen = new Map<__String, ElementKind>();
19691969

19701970
for (const prop of node.properties) {
19711971
if (prop.kind === SyntaxKind.SpreadAssignment || prop.name.kind !== SyntaxKind.Identifier) {
@@ -2980,6 +2980,9 @@ namespace ts {
29802980
}
29812981

29822982
function bindPotentiallyMissingNamespaces(namespaceSymbol: Symbol | undefined, entityName: BindableStaticNameExpression, isToplevel: boolean, isPrototypeProperty: boolean, containerIsClass: boolean) {
2983+
if (namespaceSymbol?.flags! & SymbolFlags.Alias) {
2984+
return namespaceSymbol;
2985+
}
29832986
if (isToplevel && !isPrototypeProperty) {
29842987
// make symbols or add declarations for intermediate containers
29852988
const flags = SymbolFlags.Module | SymbolFlags.Assignment;
@@ -3143,7 +3146,7 @@ namespace ts {
31433146
bindAnonymousDeclaration(node, SymbolFlags.Class, bindingName);
31443147
// Add name of class expression into the map for semantic classifier
31453148
if (node.name) {
3146-
classifiableNames.set(node.name.escapedText, true);
3149+
classifiableNames.add(node.name.escapedText);
31473150
}
31483151
}
31493152

0 commit comments

Comments
 (0)