Skip to content

Commit 75882db

Browse files
committed
Merge branch 'master' into 6229-known-length-tuples
2 parents defd32f + 1e89e78 commit 75882db

File tree

247 files changed

+2874
-1177
lines changed

Some content is hidden

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

247 files changed

+2874
-1177
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ internal/
5959
.idea
6060
yarn.lock
6161
.parallelperf.*
62+
tests/cases/user/*/package-lock.json
63+
tests/cases/user/*/node_modules/
64+
tests/cases/user/*/**/*.js
65+
tests/cases/user/*/**/*.js.map
66+
tests/cases/user/*/**/*.d.ts
67+
!tests/cases/user/zone.js/
68+
!tests/cases/user/bignumber.js/
69+
!tests/cases/user/discord.js/

Gulpfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are:
11061106
const fileMatcher = cmdLineOptions.files;
11071107
const files = fileMatcher
11081108
? `src/**/${fileMatcher}`
1109-
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
1109+
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude 'src/lib/*.d.ts'";
11101110
const cmd = `node node_modules/tslint/bin/tslint ${files} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish`;
11111111
console.log("Linting: " + cmd);
11121112
child_process.execSync(cmd, { stdio: [0, 1, 2] });

Jakefile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ var harnessCoreSources = [
105105
"projectsRunner.ts",
106106
"loggedIO.ts",
107107
"rwcRunner.ts",
108+
"userRunner.ts",
108109
"test262Runner.ts",
109110
"./parallel/shared.ts",
110111
"./parallel/host.ts",
@@ -1282,7 +1283,7 @@ task("lint", ["build-rules"], () => {
12821283
const fileMatcher = process.env.f || process.env.file || process.env.files;
12831284
const files = fileMatcher
12841285
? `src/**/${fileMatcher}`
1285-
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'";
1286+
: "Gulpfile.ts 'scripts/generateLocalizedDiagnosticMessages.ts' 'scripts/tslint/**/*.ts' 'src/**/*.ts' --exclude 'src/lib/*.d.ts'";
12861287
const cmd = `node node_modules/tslint/bin/tslint ${files} --formatters-dir ./built/local/tslint/formatters --format autolinkableStylish`;
12871288
console.log("Linting: " + cmd);
12881289
jake.exec([cmd], { interactive: true }, () => {

scripts/ior.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ module Commands {
6464
}
6565
if (path.charAt(1) === ":") {
6666
if (path.charAt(2) === directorySeparator) return 3;
67-
return 2;
6867
}
6968
return 0;
7069
}

src/compiler/binder.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ namespace ts {
15501550
function setExportContextFlag(node: ModuleDeclaration | SourceFile) {
15511551
// A declaration source file or ambient module declaration that contains no export declarations (but possibly regular
15521552
// declarations with export modifiers) is an export context in which declarations are implicitly exported.
1553-
if (isInAmbientContext(node) && !hasExportDeclarations(node)) {
1553+
if (node.flags & NodeFlags.Ambient && !hasExportDeclarations(node)) {
15541554
node.flags |= NodeFlags.ExportContext;
15551555
}
15561556
else {
@@ -1726,7 +1726,7 @@ namespace ts {
17261726
node.originalKeywordKind >= SyntaxKind.FirstFutureReservedWord &&
17271727
node.originalKeywordKind <= SyntaxKind.LastFutureReservedWord &&
17281728
!isIdentifierName(node) &&
1729-
!isInAmbientContext(node)) {
1729+
!(node.flags & NodeFlags.Ambient)) {
17301730

17311731
// Report error only if there are no parse errors in file
17321732
if (!file.parseDiagnostics.length) {
@@ -2481,7 +2481,7 @@ namespace ts {
24812481
}
24822482

24832483
function bindParameter(node: ParameterDeclaration) {
2484-
if (inStrictMode && !isInAmbientContext(node)) {
2484+
if (inStrictMode && !(node.flags & NodeFlags.Ambient)) {
24852485
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
24862486
// strict mode FunctionLikeDeclaration or FunctionExpression(13.1)
24872487
checkStrictModeEvalOrArguments(node, node.name);
@@ -2503,7 +2503,7 @@ namespace ts {
25032503
}
25042504

25052505
function bindFunctionDeclaration(node: FunctionDeclaration) {
2506-
if (!file.isDeclarationFile && !isInAmbientContext(node)) {
2506+
if (!file.isDeclarationFile && !(node.flags & NodeFlags.Ambient)) {
25072507
if (isAsyncFunction(node)) {
25082508
emitFlags |= NodeFlags.HasAsyncFunctions;
25092509
}
@@ -2520,7 +2520,7 @@ namespace ts {
25202520
}
25212521

25222522
function bindFunctionExpression(node: FunctionExpression) {
2523-
if (!file.isDeclarationFile && !isInAmbientContext(node)) {
2523+
if (!file.isDeclarationFile && !(node.flags & NodeFlags.Ambient)) {
25242524
if (isAsyncFunction(node)) {
25252525
emitFlags |= NodeFlags.HasAsyncFunctions;
25262526
}
@@ -2534,7 +2534,7 @@ namespace ts {
25342534
}
25352535

25362536
function bindPropertyOrMethodOrAccessor(node: Declaration, symbolFlags: SymbolFlags, symbolExcludes: SymbolFlags) {
2537-
if (!file.isDeclarationFile && !isInAmbientContext(node) && isAsyncFunction(node)) {
2537+
if (!file.isDeclarationFile && !(node.flags & NodeFlags.Ambient) && isAsyncFunction(node)) {
25382538
emitFlags |= NodeFlags.HasAsyncFunctions;
25392539
}
25402540

@@ -2583,7 +2583,7 @@ namespace ts {
25832583
// On the other side we do want to report errors on non-initialized 'lets' because of TDZ
25842584
const reportUnreachableCode =
25852585
!options.allowUnreachableCode &&
2586-
!isInAmbientContext(node) &&
2586+
!(node.flags & NodeFlags.Ambient) &&
25872587
(
25882588
node.kind !== SyntaxKind.VariableStatement ||
25892589
getCombinedNodeFlags((<VariableStatement>node).declarationList) & NodeFlags.BlockScoped ||

0 commit comments

Comments
 (0)