Skip to content

Commit 7b9f5b3

Browse files
committed
Merge branch 'master' into optimizeForEachChild
2 parents 24a6a08 + 2a6aacd commit 7b9f5b3

189 files changed

Lines changed: 2404 additions & 968 deletions

File tree

Some content is hidden

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

Jakefile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ var harnessSources = harnessCoreSources.concat([
138138
"telemetry.ts",
139139
"transform.ts",
140140
"customTransforms.ts",
141+
"programMissingFiles.ts",
141142
].map(function (f) {
142143
return path.join(unittestsDirectory, f);
143144
})).concat([
@@ -286,7 +287,7 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, opts
286287
var startCompileTime = mark();
287288
opts = opts || {};
288289
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
289-
var options = "--noImplicitAny --noImplicitThis --noEmitOnError --types "
290+
var options = "--noImplicitAny --noImplicitThis --alwaysStrict --noEmitOnError --types "
290291
if (opts.types) {
291292
options += opts.types.join(",");
292293
}

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
[![Join the chat at https://gitter.im/Microsoft/TypeScript](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/TypeScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
88

9-
[TypeScript](http://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](http://www.typescriptlang.org/Playground), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescriptlang).
9+
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types, classes, and modules to JavaScript. TypeScript supports tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescriptlang).
1010

1111
## Installing
1212

@@ -27,8 +27,8 @@ npm install -g typescript@next
2727
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
2828
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
2929
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
30-
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
31-
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
30+
* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
31+
* Join the [#typescript](https://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
3232
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
3333
* Read the language specification ([docx](https://github.com/Microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true),
3434
[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)).
@@ -39,14 +39,14 @@ with any additional questions or comments.
3939

4040
## Documentation
4141

42-
* [Quick tutorial](http://www.typescriptlang.org/docs/tutorial.html)
43-
* [Programming handbook](http://www.typescriptlang.org/docs/handbook/basic-types.html)
42+
* [Quick tutorial](https://www.typescriptlang.org/docs/tutorial.html)
43+
* [Programming handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html)
4444
* [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md)
45-
* [Homepage](http://www.typescriptlang.org/)
45+
* [Homepage](https://www.typescriptlang.org/)
4646

4747
## Building
4848

49-
In order to build the TypeScript compiler, ensure that you have [Git](http://git-scm.com/downloads) and [Node.js](http://nodejs.org/) installed.
49+
In order to build the TypeScript compiler, ensure that you have [Git](https://git-scm.com/downloads) and [Node.js](https://nodejs.org/) installed.
5050

5151
Clone a copy of the repo:
5252

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@types/convert-source-map": "latest",
3535
"@types/del": "latest",
3636
"@types/glob": "latest",
37-
"@types/gulp": "latest",
37+
"@types/gulp": "3.X",
3838
"@types/gulp-concat": "latest",
3939
"@types/gulp-help": "latest",
4040
"@types/gulp-newer": "latest",
@@ -52,7 +52,7 @@
5252
"chai": "latest",
5353
"convert-source-map": "latest",
5454
"del": "latest",
55-
"gulp": "latest",
55+
"gulp": "3.X",
5656
"gulp-clone": "latest",
5757
"gulp-concat": "latest",
5858
"gulp-help": "latest",

src/compiler/binder.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,22 +2080,6 @@ namespace ts {
20802080
case SyntaxKind.EnumMember:
20812081
return bindPropertyOrMethodOrAccessor(<Declaration>node, SymbolFlags.EnumMember, SymbolFlags.EnumMemberExcludes);
20822082

2083-
case SyntaxKind.SpreadAssignment:
2084-
case SyntaxKind.JsxSpreadAttribute:
2085-
let root = container;
2086-
let hasRest = false;
2087-
while (root.parent) {
2088-
if (root.kind === SyntaxKind.ObjectLiteralExpression &&
2089-
root.parent.kind === SyntaxKind.BinaryExpression &&
2090-
(root.parent as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken &&
2091-
(root.parent as BinaryExpression).left === root) {
2092-
hasRest = true;
2093-
break;
2094-
}
2095-
root = root.parent;
2096-
}
2097-
return;
2098-
20992083
case SyntaxKind.CallSignature:
21002084
case SyntaxKind.ConstructSignature:
21012085
case SyntaxKind.IndexSignature:
@@ -2321,16 +2305,16 @@ namespace ts {
23212305
if (symbol && symbol.valueDeclaration && symbol.valueDeclaration.kind === SyntaxKind.VariableDeclaration) {
23222306
const declaration = symbol.valueDeclaration as VariableDeclaration;
23232307
if (declaration.initializer) {
2324-
return isExportsOrModuleExportsOrAliasOrAssignemnt(declaration.initializer);
2308+
return isExportsOrModuleExportsOrAliasOrAssignment(declaration.initializer);
23252309
}
23262310
}
23272311
}
23282312
return false;
23292313
}
23302314

2331-
function isExportsOrModuleExportsOrAliasOrAssignemnt(node: Node): boolean {
2315+
function isExportsOrModuleExportsOrAliasOrAssignment(node: Node): boolean {
23322316
return isExportsOrModuleExportsOrAlias(node) ||
2333-
(isAssignmentExpression(node, /*excludeCompoundAssignements*/ true) && (isExportsOrModuleExportsOrAliasOrAssignemnt(node.left) || isExportsOrModuleExportsOrAliasOrAssignemnt(node.right)));
2317+
(isAssignmentExpression(node, /*excludeCompoundAssignements*/ true) && (isExportsOrModuleExportsOrAliasOrAssignment(node.left) || isExportsOrModuleExportsOrAliasOrAssignment(node.right)));
23342318
}
23352319

23362320
function bindModuleExportsAssignment(node: BinaryExpression) {
@@ -3613,4 +3597,4 @@ namespace ts {
36133597
child.parent = parent;
36143598
forEachChild(child, (childsChild) => setParentPointers(child, childsChild));
36153599
}
3616-
}
3600+
}

0 commit comments

Comments
 (0)