Skip to content

Commit 3a4613e

Browse files
committed
Merge branch 'master' into explainFiles
2 parents 5021088 + 0b6c925 commit 3a4613e

File tree

1,158 files changed

+14561
-2545
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,158 files changed

+14561
-2545
lines changed

.github/pr_owners.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ RyanCavanaugh
66
sheetalkamat
77
orta
88
rbuckton
9+
ahejlsberg
10+
amcasey
11+
jessetrinity
12+
minestarks
13+
uniqueiniquity
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Accept Baselines and Fix Lints
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use node version 12
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
registry-url: https://registry.npmjs.org/
17+
18+
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
19+
run: |
20+
git config user.email "[email protected]"
21+
git config user.name "TypeScript Bot"
22+
npm install
23+
gulp runtests-parallel --ci --fix
24+
gulp baseline-accept
25+
git add ./src
26+
git add ./tests/baselines/reference
27+
git diff --cached
28+
git commit -m "Update Baselines and/or Applied Lint Fixes"
29+
git push

.github/workflows/release-branch-artifact.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
npm test
2626
env:
2727
CI: true
28+
- name: Adding playwright
29+
run: npm install --no-save --no-package-lock playwright
2830
- name: Validate the browser can import TypeScript
2931
run: gulp test-browser-integration
3032
- name: LKG, clean, and pack

Gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ task("LKG").description = "Makes a new LKG out of the built js files";
590590
task("LKG").flags = {
591591
" --built": "Compile using the built version of the compiler.",
592592
};
593+
task("lkg", series("LKG"));
593594

594595
const generateSpec = () => exec("cscript", ["//nologo", "scripts/word2md.js", path.resolve("doc/TypeScript Language Specification - ARCHIVED.docx"), path.resolve("doc/spec-ARCHIVED.md")]);
595596
task("generate-spec", series(buildScripts, generateSpec));

doc/handbook/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# The TypeScript Handbook
22

3-
The contents of the TypeScript Handbook can be read from [its GitHub repository](https://github.com/Microsoft/TypeScript-Handbook).
4-
Issues and pull requests should be directed there.
3+
The contents of the TypeScript Handbook can be found in the
4+
[TypeScript website repository](https://github.com/microsoft/TypeScript-Website/tree/v2/packages/documentation).
5+
Issues and pull requests should be directed there.

package-lock.json

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

src/compiler/binder.ts

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

176176
export function bindSourceFile(file: SourceFile, options: CompilerOptions) {
177-
const tracingData: tracing.EventData = [tracing.Phase.Bind, "bindSourceFile", { path: file.path }];
178-
tracing.begin(...tracingData);
177+
tracing.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true);
179178
performance.mark("beforeBind");
180179
perfLogger.logStartBindFile("" + file.fileName);
181180
binder(file, options);
182181
perfLogger.logStopBindFile();
183182
performance.mark("afterBind");
184183
performance.measure("Bind", "beforeBind", "afterBind");
185-
tracing.end(...tracingData);
184+
tracing.pop();
186185
}
187186

188187
function createBinder(): (file: SourceFile, options: CompilerOptions) => void {
@@ -670,7 +669,7 @@ namespace ts {
670669
}
671670
// We create a return control flow graph for IIFEs and constructors. For constructors
672671
// we use the return control flow graph in strict property initialization checks.
673-
currentReturnTarget = isIIFE || node.kind === SyntaxKind.Constructor || (isInJSFile && (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression)) ? createBranchLabel() : undefined;
672+
currentReturnTarget = isIIFE || node.kind === SyntaxKind.Constructor || (isInJSFile(node) && (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression)) ? createBranchLabel() : undefined;
674673
currentExceptionTarget = undefined;
675674
currentBreakTarget = undefined;
676675
currentContinueTarget = undefined;
@@ -691,7 +690,7 @@ namespace ts {
691690
if (currentReturnTarget) {
692691
addAntecedent(currentReturnTarget, currentFlow);
693692
currentFlow = finishFlowLabel(currentReturnTarget);
694-
if (node.kind === SyntaxKind.Constructor || (isInJSFile && (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression))) {
693+
if (node.kind === SyntaxKind.Constructor || (isInJSFile(node) && (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.FunctionExpression))) {
695694
(<FunctionLikeDeclaration>node).returnFlowNode = currentFlow;
696695
}
697696
}

0 commit comments

Comments
 (0)