Skip to content

Commit 19e2fa6

Browse files
committed
Merge branch 'master' into isInMultiLineComment
2 parents b7bc7d8 + d4fecd4 commit 19e2fa6

File tree

3,937 files changed

+15009
-8817
lines changed

Some content is hidden

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

3,937 files changed

+15009
-8817
lines changed

.vscode/tasks.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
"problemMatcher": [
1919
"$tsc"
2020
]
21+
},
22+
{
23+
"taskName": "tests",
24+
"showOutput": "silent",
25+
"problemMatcher": [
26+
"$tsc"
27+
]
2128
}
2229
]
2330
}

Jakefile.js

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ var harnessSources = harnessCoreSources.concat([
133133
"projectErrors.ts",
134134
"matchFiles.ts",
135135
"initializeTSConfig.ts",
136+
"extractMethods.ts",
136137
"printer.ts",
137138
"textChanges.ts",
138139
"telemetry.ts",
@@ -533,7 +534,6 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename);
533534
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);
534535

535536
var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
536-
var servicesFileInBrowserTest = path.join(builtLocalDirectory, "typescriptServicesInBrowserTest.js");
537537
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
538538
var nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
539539
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
@@ -572,22 +572,6 @@ compileFile(servicesFile, servicesSources, [builtLocalDirectory, copyright].conc
572572
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
573573
});
574574

575-
compileFile(
576-
servicesFileInBrowserTest,
577-
servicesSources,
578-
[builtLocalDirectory, copyright].concat(servicesSources),
579-
/*prefixes*/[copyright],
580-
/*useBuiltCompiler*/ true,
581-
{
582-
noOutFile: false,
583-
generateDeclarations: true,
584-
preserveConstEnums: true,
585-
keepComments: true,
586-
noResolve: false,
587-
stripInternal: true,
588-
inlineSourceMap: true
589-
});
590-
591575
file(typescriptServicesDts, [servicesFile]);
592576

593577
var cancellationTokenFile = path.join(builtLocalDirectory, "cancellationToken.js");
@@ -725,7 +709,7 @@ compileFile(
725709
/*prereqs*/[builtLocalDirectory, tscFile].concat(libraryTargets).concat(servicesSources).concat(harnessSources),
726710
/*prefixes*/[],
727711
/*useBuiltCompiler:*/ true,
728-
/*opts*/ { inlineSourceMap: true, types: ["node", "mocha", "chai"], lib: "es6" });
712+
/*opts*/ { types: ["node", "mocha", "chai"], lib: "es6" });
729713

730714
var internalTests = "internal/";
731715

@@ -961,13 +945,14 @@ var nodeServerInFile = "tests/webTestServer.ts";
961945
compileFile(nodeServerOutFile, [nodeServerInFile], [builtLocalDirectory, tscFile], [], /*useBuiltCompiler:*/ true, { noOutFile: true, lib: "es6" });
962946

963947
desc("Runs browserify on run.js to produce a file suitable for running tests in the browser");
964-
task("browserify", ["tests", run, builtLocalDirectory, nodeServerOutFile], function() {
965-
var cmd = 'browserify built/local/run.js -t ./scripts/browserify-optional -d -o built/local/bundle.js';
948+
task("browserify", [], function() {
949+
// Shell out to `gulp`, since we do the work to handle sourcemaps correctly w/o inline maps there
950+
var cmd = 'gulp browserify --silent';
966951
exec(cmd);
967952
}, { async: true });
968953

969954
desc("Runs the tests using the built run.js file like 'jake runtests'. Syntax is jake runtests-browser. Additional optional parameters tests=[regex], browser=[chrome|IE]");
970-
task("runtests-browser", ["tests", "browserify", builtLocalDirectory, servicesFileInBrowserTest], function () {
955+
task("runtests-browser", ["browserify", nodeServerOutFile], function () {
971956
cleanTestDirs();
972957
host = "node";
973958
browser = process.env.browser || process.env.b || (os.platform() === "linux" ? "chrome" : "IE");

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"setup-hooks": "node scripts/link-hooks.js"
9191
},
9292
"browser": {
93-
"buffer": false,
9493
"fs": false,
9594
"os": false,
9695
"path": false

src/compiler/binder.ts

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -806,43 +806,26 @@ namespace ts {
806806
return antecedent;
807807
}
808808
setFlowNodeReferenced(antecedent);
809-
return <FlowCondition>{
810-
flags,
811-
expression,
812-
antecedent
813-
};
809+
return { flags, expression, antecedent };
814810
}
815811

816812
function createFlowSwitchClause(antecedent: FlowNode, switchStatement: SwitchStatement, clauseStart: number, clauseEnd: number): FlowNode {
817813
if (!isNarrowingExpression(switchStatement.expression)) {
818814
return antecedent;
819815
}
820816
setFlowNodeReferenced(antecedent);
821-
return <FlowSwitchClause>{
822-
flags: FlowFlags.SwitchClause,
823-
switchStatement,
824-
clauseStart,
825-
clauseEnd,
826-
antecedent
827-
};
817+
return { flags: FlowFlags.SwitchClause, switchStatement, clauseStart, clauseEnd, antecedent };
828818
}
829819

830820
function createFlowAssignment(antecedent: FlowNode, node: Expression | VariableDeclaration | BindingElement): FlowNode {
831821
setFlowNodeReferenced(antecedent);
832-
return <FlowAssignment>{
833-
flags: FlowFlags.Assignment,
834-
antecedent,
835-
node
836-
};
822+
return { flags: FlowFlags.Assignment, antecedent, node };
837823
}
838824

839825
function createFlowArrayMutation(antecedent: FlowNode, node: CallExpression | BinaryExpression): FlowNode {
840826
setFlowNodeReferenced(antecedent);
841-
return <FlowArrayMutation>{
842-
flags: FlowFlags.ArrayMutation,
843-
antecedent,
844-
node
845-
};
827+
const res: FlowArrayMutation = { flags: FlowFlags.ArrayMutation, antecedent, node };
828+
return res;
846829
}
847830

848831
function finishFlowLabel(flow: FlowLabel): FlowNode {
@@ -2784,7 +2767,6 @@ namespace ts {
27842767

27852768
function computeParameter(node: ParameterDeclaration, subtreeFlags: TransformFlags) {
27862769
let transformFlags = subtreeFlags;
2787-
const modifierFlags = getModifierFlags(node);
27882770
const name = node.name;
27892771
const initializer = node.initializer;
27902772
const dotDotDotToken = node.dotDotDotToken;
@@ -2799,7 +2781,7 @@ namespace ts {
27992781
}
28002782

28012783
// If a parameter has an accessibility modifier, then it is TypeScript syntax.
2802-
if (modifierFlags & ModifierFlags.ParameterPropertyModifier) {
2784+
if (hasModifier(node, ModifierFlags.ParameterPropertyModifier)) {
28032785
transformFlags |= TransformFlags.AssertTypeScript | TransformFlags.ContainsParameterPropertyAssignments;
28042786
}
28052787

@@ -2844,9 +2826,8 @@ namespace ts {
28442826

28452827
function computeClassDeclaration(node: ClassDeclaration, subtreeFlags: TransformFlags) {
28462828
let transformFlags: TransformFlags;
2847-
const modifierFlags = getModifierFlags(node);
28482829

2849-
if (modifierFlags & ModifierFlags.Ambient) {
2830+
if (hasModifier(node, ModifierFlags.Ambient)) {
28502831
// An ambient declaration is TypeScript syntax.
28512832
transformFlags = TransformFlags.AssertTypeScript;
28522833
}
@@ -3190,11 +3171,10 @@ namespace ts {
31903171

31913172
function computeVariableStatement(node: VariableStatement, subtreeFlags: TransformFlags) {
31923173
let transformFlags: TransformFlags;
3193-
const modifierFlags = getModifierFlags(node);
31943174
const declarationListTransformFlags = node.declarationList.transformFlags;
31953175

31963176
// An ambient declaration is TypeScript syntax.
3197-
if (modifierFlags & ModifierFlags.Ambient) {
3177+
if (hasModifier(node, ModifierFlags.Ambient)) {
31983178
transformFlags = TransformFlags.AssertTypeScript;
31993179
}
32003180
else {

0 commit comments

Comments
 (0)