Skip to content

Commit 76d624d

Browse files
Merge branch 'master' into dogfoodStringLiterals
2 parents 527f465 + 6b27ce4 commit 76d624d

114 files changed

Lines changed: 3328 additions & 460 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.

AUTHORS.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ TypeScript is authored by:
88
* Basarat Ali Syed
99
* Ben Duffield
1010
* Bill Ticehurst
11+
* Brett Mayen
1112
* Bryan Forbes
1213
* Caitlin Potter
1314
* Chris Bubernak
@@ -17,11 +18,14 @@ TypeScript is authored by:
1718
* Dan Quirk
1819
* Daniel Rosenwasser
1920
* David Li
20-
* Dick van den Brink
21-
* Dirk Bäumer
21+
* Denis Nedelyaev
22+
* Dick van den Brink
23+
* Dirk Bäumer
24+
* Eyas Sharaiha
2225
* Frank Wallis
2326
* Gabriel Isenberg
2427
* Gilad Peleg
28+
* Graeme Wicksted
2529
* Guillaume Salles
2630
* Harald Niesche
2731
* Ingvar Stepanyan
@@ -31,30 +35,39 @@ TypeScript is authored by:
3135
* Jason Ramsay
3236
* Jed Mao
3337
* Johannes Rieken
38+
* John Vilk
3439
* Jonathan Bond-Caron
3540
* Jonathan Park
3641
* Jonathan Turner
3742
* Josh Kalderimis
43+
* Julian Williams
3844
* Kagami Sascha Rosylight
3945
* Keith Mashinter
46+
* Ken Howard
4047
* Kenji Imamula
4148
* Lorant Pinter
49+
* Martin Všetička
4250
* Masahiro Wakame
4351
* Max Deepfield
4452
* Micah Zoltu
4553
* Mohamed Hegazy
54+
* Nathan Shively-Sanders
4655
* Oleg Mihailik
4756
* Oleksandr Chekhovskyi
4857
* Paul van Brenk
4958
* Pedro Maltez
5059
* Philip Bulley
5160
* piloopin
61+
* @progre
62+
* Punya Biswal
5263
* Ron Buckton
5364
* Ryan Cavanaugh
65+
* Ryohei Ikegami
66+
* Sébastien Arod
5467
* Sheetal Nandi
5568
* Shengping Zhong
5669
* Shyyko Serhiy
57-
* Simon Hürlimann
70+
* Simon Hürlimann
5871
* Solal Pirelli
5972
* Stan Thomas
6073
* Steve Lucco
@@ -63,8 +76,10 @@ TypeScript is authored by:
6376
* togru
6477
* Tomas Grubliauskas
6578
* TruongSinh Tran-Nguyen
79+
* Viliv Vane
6680
* Vladimir Matveev
6781
* Wesley Wigham
82+
* York Yao
6883
* Yui Tanglertsampan
6984
* Zev Spitz
70-
* Zhengbo Li
85+
* Zhengbo Li

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Build Status](https://travis-ci.org/Microsoft/TypeScript.svg?branch=master)](https://travis-ci.org/Microsoft/TypeScript)
2-
[![npm version](https://badge.fury.io/js/typescript.svg)](http://badge.fury.io/js/typescript)
3-
[![Downloads](http://img.shields.io/npm/dm/TypeScript.svg)](https://npmjs.org/package/typescript)
2+
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
3+
[![Downloads](https://img.shields.io/npm/dm/TypeScript.svg)](https://www.npmjs.com/package/typescript)
44

55
# TypeScript
66

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"browserify": "latest",
3636
"istanbul": "latest",
3737
"mocha-fivemat-progress-reporter": "latest",
38-
"tslint": "latest",
38+
"tslint": "next",
39+
"typescript": "next",
3940
"tsd": "latest"
4041
},
4142
"scripts": {

scripts/tslint/booleanTriviaRule.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
2-
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
3-
1+
import * as Lint from "tslint/lib/lint";
2+
import * as ts from "typescript";
43

54
export class Rule extends Lint.Rules.AbstractRule {
65
public static FAILURE_STRING_FACTORY = (name: string, currently: string) => `Tag boolean argument as '${name}' (currently '${currently}')`;
@@ -19,7 +18,7 @@ class BooleanTriviaWalker extends Lint.RuleWalker {
1918

2019
visitCallExpression(node: ts.CallExpression) {
2120
super.visitCallExpression(node);
22-
if (node.arguments) {
21+
if (node.arguments) {
2322
const targetCallSignature = this.checker.getResolvedSignature(node);
2423
if (!!targetCallSignature) {
2524
const targetParameters = targetCallSignature.getParameters();
@@ -37,14 +36,14 @@ class BooleanTriviaWalker extends Lint.RuleWalker {
3736
let triviaContent: string;
3837
const ranges = ts.getLeadingCommentRanges(arg.getFullText(), 0);
3938
if (ranges && ranges.length === 1 && ranges[0].kind === ts.SyntaxKind.MultiLineCommentTrivia) {
40-
triviaContent = arg.getFullText().slice(ranges[0].pos + 2, ranges[0].end - 2); //+/-2 to remove /**/
39+
triviaContent = arg.getFullText().slice(ranges[0].pos + 2, ranges[0].end - 2); // +/-2 to remove /**/
4140
}
4241
if (triviaContent !== param.getName()) {
4342
this.addFailure(this.createFailure(arg.getStart(source), arg.getWidth(source), Rule.FAILURE_STRING_FACTORY(param.getName(), triviaContent)));
4443
}
4544
}
4645
}
4746
}
48-
}
47+
}
4948
}
5049
}

scripts/tslint/nextLineRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
2-
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
1+
import * as Lint from "tslint/lib/lint";
2+
import * as ts from "typescript";
33

44
const OPTION_CATCH = "check-catch";
55
const OPTION_ELSE = "check-else";

scripts/tslint/noNullRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
2-
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
1+
import * as Lint from "tslint/lib/lint";
2+
import * as ts from "typescript";
33

44

55
export class Rule extends Lint.Rules.AbstractRule {

scripts/tslint/preferConstRule.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
2-
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
1+
import * as Lint from "tslint/lib/lint";
2+
import * as ts from "typescript";
33

44

55
export class Rule extends Lint.Rules.AbstractRule {
@@ -101,13 +101,13 @@ class PreferConstWalker extends Lint.RuleWalker {
101101
this.visitBindingLiteralExpression(node as (ts.ArrayLiteralExpression | ts.ObjectLiteralExpression));
102102
}
103103
}
104-
104+
105105
private visitBindingLiteralExpression(node: ts.ArrayLiteralExpression | ts.ObjectLiteralExpression) {
106106
if (node.kind === ts.SyntaxKind.ObjectLiteralExpression) {
107107
const pattern = node as ts.ObjectLiteralExpression;
108108
for (const element of pattern.properties) {
109109
if (element.name.kind === ts.SyntaxKind.Identifier) {
110-
this.markAssignment(element.name as ts.Identifier)
110+
this.markAssignment(element.name as ts.Identifier);
111111
}
112112
else if (isBindingPattern(element.name)) {
113113
this.visitBindingPatternIdentifiers(element.name as ts.BindingPattern);

scripts/tslint/typeOperatorSpacingRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
2-
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
1+
import * as Lint from "tslint/lib/lint";
2+
import * as ts from "typescript";
33

44

55
export class Rule extends Lint.Rules.AbstractRule {

src/compiler/binder.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,14 @@ namespace ts {
175175
symbol.members = {};
176176
}
177177

178-
if (symbolFlags & SymbolFlags.Value && !symbol.valueDeclaration) {
179-
symbol.valueDeclaration = node;
180-
}
178+
if (symbolFlags & SymbolFlags.Value) {
179+
const valueDeclaration = symbol.valueDeclaration;
180+
if (!valueDeclaration ||
181+
(valueDeclaration.kind !== node.kind && valueDeclaration.kind === SyntaxKind.ModuleDeclaration)) {
182+
// other kinds of value declarations take precedence over modules
183+
symbol.valueDeclaration = node;
184+
}
185+
}
181186
}
182187

183188
// Should not be called on a declaration with a computed property name,

0 commit comments

Comments
 (0)