Skip to content

Commit cd2638e

Browse files
committed
Merge pull request #5 from Microsoft/master
fetch lastest code
2 parents 2e67984 + 6cc44d1 commit cd2638e

File tree

710 files changed

+20370
-2808
lines changed

Some content is hidden

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

710 files changed

+20370
-2808
lines changed

AUTHORS.md

+20
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ TypeScript is authored by:
22

33
* Adam Freidin
44
* Ahmad Farid
5+
* Akshar Patel
56
* Anders Hejlsberg
67
* Arnav Singh
78
* Arthur Ozga
9+
* Asad Saeeduddin
810
* Basarat Ali Syed
911
* Ben Duffield
1012
* Bill Ticehurst
@@ -15,52 +17,67 @@ TypeScript is authored by:
1517
* Colby Russell
1618
* Colin Snover
1719
* Cyrus Najmabadi
20+
* Dan Corder
1821
* Dan Quirk
1922
* Daniel Rosenwasser
23+
* @dashaus
2024
* David Li
2125
* Denis Nedelyaev
2226
* Dick van den Brink
2327
* Dirk Bäumer
28+
* Dirk Holtwick
2429
* Eyas Sharaiha
30+
* @falsandtru
2531
* Frank Wallis
2632
* Gabriel Isenberg
2733
* Gilad Peleg
2834
* Graeme Wicksted
2935
* Guillaume Salles
36+
* Guy Bedford
3037
* Harald Niesche
38+
* Iain Monro
3139
* Ingvar Stepanyan
3240
* Ivo Gabe de Wolff
3341
* James Whitney
3442
* Jason Freeman
43+
* Jason Killian
3544
* Jason Ramsay
3645
* Jed Mao
46+
* Jeffrey Morlan
3747
* Johannes Rieken
3848
* John Vilk
3949
* Jonathan Bond-Caron
4050
* Jonathan Park
4151
* Jonathan Turner
52+
* Jonathon Smith
4253
* Josh Kalderimis
4354
* Julian Williams
4455
* Kagami Sascha Rosylight
4556
* Keith Mashinter
4657
* Ken Howard
4758
* Kenji Imamula
4859
* Lorant Pinter
60+
* Lucien Greathouse
4961
* Martin Všetička
5062
* Masahiro Wakame
63+
* Mattias Buelens
5164
* Max Deepfield
5265
* Micah Zoltu
5366
* Mohamed Hegazy
5467
* Nathan Shively-Sanders
68+
* Nathan Yee
5569
* Oleg Mihailik
5670
* Oleksandr Chekhovskyi
5771
* Paul van Brenk
72+
* @pcbro
5873
* Pedro Maltez
5974
* Philip Bulley
6075
* piloopin
6176
* @progre
6277
* Punya Biswal
78+
* Richard Sentino
6379
* Ron Buckton
80+
* Rowan Wyborn
6481
* Ryan Cavanaugh
6582
* Ryohei Ikegami
6683
* Sébastien Arod
@@ -71,7 +88,9 @@ TypeScript is authored by:
7188
* Solal Pirelli
7289
* Stan Thomas
7390
* Steve Lucco
91+
* Thomas Loubiou
7492
* Tien Hoanhtien
93+
* Tim Perry
7594
* Tingan Ho
7695
* togru
7796
* Tomas Grubliauskas
@@ -81,5 +100,6 @@ TypeScript is authored by:
81100
* Wesley Wigham
82101
* York Yao
83102
* Yui Tanglertsampan
103+
* Yuichi Nukiyama
84104
* Zev Spitz
85105
* Zhengbo Li

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can try out the nightly build of TypeScript (`npm install typescript@next`)
3030
We also accept suggestions in the issue tracker.
3131
Be sure to [check the FAQ](https://github.com/Microsoft/TypeScript/wiki/FAQ) and [search](https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue) first.
3232

33-
In general, things we find useful when reviewing suggestins are:
33+
In general, things we find useful when reviewing suggestions are:
3434
* A description of the problem you're trying to solve
3535
* An overview of the suggested solution
3636
* Examples of how the suggestion would work in various places
@@ -71,7 +71,7 @@ Your pull request should:
7171
* Tests should include reasonable permutations of the target fix/change
7272
* Include baseline changes with your change
7373
* All changed code must have 100% code coverage
74-
* Follow the code conventions descriped in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
74+
* Follow the code conventions described in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines)
7575
* To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration
7676

7777
## Contributing `lib.d.ts` fixes
564 Bytes
Binary file not shown.

doc/spec.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3885,7 +3885,7 @@ function g(x: number) {
38853885
38863886
the inferred return type for 'f' and 'g' is Any because the functions reference themselves through a cycle with no return type annotations. Adding an explicit return type 'number' to either breaks the cycle and causes the return type 'number' to be inferred for the other.
38873887
3888-
An explicitly typed function whose return type isn't the Void or the Any type must have at least one return statement somewhere in its body. An exception to this rule is if the function implementation consists of a single 'throw' statement.
3888+
An explicitly typed function whose return type isn't the Void type, the Any type, or a union type containing the Void or Any type as a constituent must have at least one return statement somewhere in its body. An exception to this rule is if the function implementation consists of a single 'throw' statement.
38893889
38903890
The type of 'this' in a function implementation is the Any type.
38913891

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript",
33
"author": "Microsoft Corp.",
44
"homepage": "http://typescriptlang.org/",
5-
"version": "1.8.0",
5+
"version": "1.9.0",
66
"license": "Apache-2.0",
77
"description": "TypeScript is a language for application scale JavaScript development",
88
"keywords": [

src/compiler/binder.ts

+16-7
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ namespace ts {
11101110
}
11111111

11121112
function checkStrictModeNumericLiteral(node: LiteralExpression) {
1113-
if (inStrictMode && node.flags & NodeFlags.OctalLiteral) {
1113+
if (inStrictMode && node.isOctalLiteral) {
11141114
file.bindDiagnostics.push(createDiagnosticForNode(node, Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
11151115
}
11161116
}
@@ -1384,7 +1384,7 @@ namespace ts {
13841384
// Export assignment in some sort of block construct
13851385
bindAnonymousDeclaration(node, SymbolFlags.Alias, getDeclarationName(node));
13861386
}
1387-
else if (boundExpression.kind === SyntaxKind.Identifier) {
1387+
else if (boundExpression.kind === SyntaxKind.Identifier && node.kind === SyntaxKind.ExportAssignment) {
13881388
// An export default clause with an identifier exports all meanings of that identifier
13891389
declareSymbol(container.symbol.exports, container.symbol, node, SymbolFlags.Alias, SymbolFlags.PropertyExcludes | SymbolFlags.AliasExcludes);
13901390
}
@@ -1435,7 +1435,8 @@ namespace ts {
14351435
// Declare a 'member' in case it turns out the container was an ES5 class
14361436
if (container.kind === SyntaxKind.FunctionExpression || container.kind === SyntaxKind.FunctionDeclaration) {
14371437
container.symbol.members = container.symbol.members || {};
1438-
declareSymbol(container.symbol.members, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes);
1438+
// It's acceptable for multiple 'this' assignments of the same identifier to occur
1439+
declareSymbol(container.symbol.members, container.symbol, node, SymbolFlags.Property, SymbolFlags.PropertyExcludes & ~SymbolFlags.Property);
14391440
}
14401441
}
14411442

@@ -1444,8 +1445,16 @@ namespace ts {
14441445

14451446
// Look up the function in the local scope, since prototype assignments should
14461447
// follow the function declaration
1447-
const classId = <Identifier>(<PropertyAccessExpression>(<PropertyAccessExpression>node.left).expression).expression;
1448-
const funcSymbol = container.locals[classId.text];
1448+
const leftSideOfAssignment = node.left as PropertyAccessExpression;
1449+
const classPrototype = leftSideOfAssignment.expression as PropertyAccessExpression;
1450+
const constructorFunction = classPrototype.expression as Identifier;
1451+
1452+
// Fix up parent pointers since we're going to use these nodes before we bind into them
1453+
leftSideOfAssignment.parent = node;
1454+
constructorFunction.parent = classPrototype;
1455+
classPrototype.parent = leftSideOfAssignment;
1456+
1457+
const funcSymbol = container.locals[constructorFunction.text];
14491458
if (!funcSymbol || !(funcSymbol.flags & SymbolFlags.Function)) {
14501459
return;
14511460
}
@@ -1456,13 +1465,13 @@ namespace ts {
14561465
}
14571466

14581467
// Declare the method/property
1459-
declareSymbol(funcSymbol.members, funcSymbol, <PropertyAccessExpression>node.left, SymbolFlags.Property, SymbolFlags.PropertyExcludes);
1468+
declareSymbol(funcSymbol.members, funcSymbol, leftSideOfAssignment, SymbolFlags.Property, SymbolFlags.PropertyExcludes);
14601469
}
14611470

14621471
function bindCallExpression(node: CallExpression) {
14631472
// We're only inspecting call expressions to detect CommonJS modules, so we can skip
14641473
// this check if we've already seen the module indicator
1465-
if (!file.commonJsModuleIndicator && isRequireCall(node)) {
1474+
if (!file.commonJsModuleIndicator && isRequireCall(node, /*checkArgumentIsStringLiteral*/false)) {
14661475
setCommonJsModuleIndicator(node);
14671476
}
14681477
}

0 commit comments

Comments
 (0)