Skip to content

Commit 34a8c84

Browse files
committed
Merge branch 'master' into jsdoc-dotdotdot-binds-tighter-than-postfix
2 parents c81a941 + 4ee7d3a commit 34a8c84

File tree

314 files changed

+4546
-7598
lines changed

Some content is hidden

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

314 files changed

+4546
-7598
lines changed

.mailmap

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Andy Hanson <[email protected]> Andy <[email protected]>
1717
Anil Anar <[email protected]>
1818
Anton Tolmachev <[email protected]>
1919
Anubha Mathur <[email protected]> anubmat <[email protected]>
20+
Armando Aguirre <[email protected]>
21+
Arnaud Tournier <[email protected]>
2022
Arnavion <[email protected]> # Arnav Singh
2123
Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]> Arthur Ozga <[email protected]>
2224
Asad Saeeduddin <[email protected]>
@@ -26,6 +28,7 @@ Bill Ticehurst <[email protected]> Bill Ticehurst <[email protected]>
2628
Ben Duffield <[email protected]>
2729
Ben Mosher <[email protected]>
2830
Benjamin Bock <[email protected]>
31+
Benjamin Lichtman <[email protected]> uniqueiniquity <[email protected]>
2932
Blake Embrey <[email protected]>
3033
Bowden Kelly <[email protected]>
3134
Brett Mayen <[email protected]>
@@ -59,6 +62,7 @@ Evan Sebastian <[email protected]>
5962
Eyas <[email protected]> # Eyas Sharaiha
6063
Fabian Cook <[email protected]>
6164
falsandtru <[email protected]> # @falsandtru
65+
Filipe Silva <[email protected]>
6266
flowmemo <[email protected]> # @flowmemo
6367
Frank Wallis <[email protected]>
6468
František Žiacik <[email protected]> František Žiacik <[email protected]>
@@ -192,7 +196,7 @@ TruongSinh Tran-Nguyen <[email protected]>
192196
vilicvane <[email protected]> # Vilic Vane
193197
Vladimir Matveev <[email protected]> vladima <[email protected]> v2m <[email protected]>
194198
Vadi Taslim <[email protected]>
195-
Wesley Wigham <[email protected]> Wesley Wigham <[email protected]>
199+
Wesley Wigham <[email protected]> Wesley Wigham <[email protected]> Wesley Wigham <[email protected]>
196200
197201
Yuichi Nukiyama <[email protected]> YuichiNukiyama <[email protected]>
198202
Zev Spitz <[email protected]>
@@ -267,4 +271,9 @@ Reiner Dolp <[email protected]>
267271
268272
TravCav <[email protected]> # @TravCav
269273
Vladimir Kurchatkin <[email protected]>
270-
William Orr <[email protected]>
274+
William Orr <[email protected]>
275+
Francois Wouts <[email protected]>
276+
Jan Melcher <[email protected]> Jan Melcher <[email protected]>
277+
Matt Mitchell <[email protected]>
278+
Maxwell Paul Brickner <[email protected]>
279+
Tycho Grouwstra <[email protected]>

AUTHORS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ TypeScript is authored by:
2525
* Anton Khlynovskiy
2626
* Anton Tolmachev
2727
* Anubha Mathur
28+
* Armando Aguirre
29+
* Arnaud Tournier
2830
* Arnav Singh
2931
* Arthur Ozga
3032
* Asad Saeeduddin
@@ -33,6 +35,7 @@ TypeScript is authored by:
3335
* Ben Duffield
3436
* Ben Mosher
3537
* Benjamin Bock
38+
* Benjamin Lichtman
3639
* Benny Neugebauer
3740
* Bill Ticehurst
3841
* Blaine Bublitz
@@ -85,7 +88,9 @@ TypeScript is authored by:
8588
* Eyas Sharaiha
8689
* Fabian Cook
8790
* @falsandtru
91+
* Filipe Silva
8892
* @flowmemo
93+
* Francois Wouts
8994
* Frank Wallis
9095
* Franklin Tse
9196
* František Žiacik
@@ -112,6 +117,7 @@ TypeScript is authored by:
112117
* Jakub Młokosiewicz
113118
* James Henry
114119
* James Whitney
120+
* Jan Melcher
115121
* Jason Freeman
116122
* Jason Jarrett
117123
* Jason Killian
@@ -162,9 +168,11 @@ TypeScript is authored by:
162168
* Masahiro Wakame
163169
* Matt Bierner
164170
* Matt McCutchen
171+
* Matt Mitchell
165172
* Mattias Buelens
166173
* Mattias Buelens
167174
* Max Deepfield
175+
* Maxwell Paul Brickner
168176
* Micah Zoltu
169177
* Michael
170178
* Michael Bromley
@@ -243,6 +251,7 @@ TypeScript is authored by:
243251
* Torben Fitschen
244252
* @TravCav
245253
* TruongSinh Tran-Nguyen
254+
* Tycho Grouwstra
246255
* Vadi Taslim
247256
* Vidar Tonaas Fauske
248257
* Viktor Zozulyak

Gulpfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
786786
const file = new Vinyl({ contents, path: bundlePath });
787787
console.log(`Fixing sourcemaps for ${file.path}`);
788788
// assumes contents is a Buffer, since that's what browserify yields
789-
const maps = convertMap.fromSource(stringContent, /*largeSource*/ true).toObject();
789+
const maps = convertMap.fromSource(stringContent).toObject();
790790
delete maps.sourceRoot;
791791
maps.sources = maps.sources.map(s => path.resolve(s === "_stream_0.js" ? "built/local/_stream_0.js" : s));
792792
// Strip browserify's inline comments away (could probably just let sorcery do this, but then we couldn't fix the paths)

Jakefile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ var harnessSources = harnessCoreSources.concat([
143143
"customTransforms.ts",
144144
"programMissingFiles.ts",
145145
"symbolWalker.ts",
146+
"languageService.ts",
146147
].map(function (f) {
147148
return path.join(unittestsDirectory, f);
148149
})).concat([

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
For the latest stable version:
1414

15-
```
15+
```bash
1616
npm install -g typescript
1717
```
1818

1919
For our nightly builds:
2020

21-
```
21+
```bash
2222
npm install -g typescript@next
2323
```
2424

@@ -50,19 +50,19 @@ In order to build the TypeScript compiler, ensure that you have [Git](https://gi
5050

5151
Clone a copy of the repo:
5252

53-
```
53+
```bash
5454
git clone https://github.com/Microsoft/TypeScript.git
5555
```
5656

5757
Change to the TypeScript directory:
5858

59-
```
59+
```bash
6060
cd TypeScript
6161
```
6262

6363
Install Gulp tools and dev dependencies:
6464

65-
```
65+
```bash
6666
npm install -g gulp
6767
npm install
6868
```
@@ -88,7 +88,7 @@ gulp help # List the above commands.
8888

8989
## Usage
9090

91-
```shell
91+
```bash
9292
node built/local/tsc.js hello.ts
9393
```
9494

src/compiler/binder.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,11 @@ namespace ts {
203203
node.symbol = symbol;
204204

205205
if (!symbol.declarations) {
206-
symbol.declarations = [];
206+
symbol.declarations = [node];
207+
}
208+
else {
209+
symbol.declarations.push(node);
207210
}
208-
symbol.declarations.push(node);
209211

210212
if (symbolFlags & SymbolFlags.HasExports && !symbol.exports) {
211213
symbol.exports = createSymbolTable();
@@ -282,17 +284,8 @@ namespace ts {
282284
const index = indexOf(functionType.parameters, node);
283285
return "arg" + index as __String;
284286
case SyntaxKind.JSDocTypedefTag:
285-
const parentNode = node.parent && node.parent.parent;
286-
let nameFromParentNode: __String;
287-
if (parentNode && parentNode.kind === SyntaxKind.VariableStatement) {
288-
if ((<VariableStatement>parentNode).declarationList.declarations.length > 0) {
289-
const nameIdentifier = (<VariableStatement>parentNode).declarationList.declarations[0].name;
290-
if (isIdentifier(nameIdentifier)) {
291-
nameFromParentNode = nameIdentifier.escapedText;
292-
}
293-
}
294-
}
295-
return nameFromParentNode;
287+
const name = getNameOfJSDocTypedef(node as JSDocTypedefTag);
288+
return typeof name !== "undefined" ? name.escapedText : undefined;
296289
}
297290
}
298291

@@ -598,7 +591,7 @@ namespace ts {
598591
// Binding of JsDocComment should be done before the current block scope container changes.
599592
// because the scope of JsDocComment should not be affected by whether the current node is a
600593
// container or not.
601-
if (node.jsDoc) {
594+
if (hasJSDocNodes(node)) {
602595
if (isInJavaScriptFile(node)) {
603596
for (const j of node.jsDoc) {
604597
bind(j);
@@ -1931,7 +1924,7 @@ namespace ts {
19311924
}
19321925

19331926
function bindJSDocTypedefTagIfAny(node: Node) {
1934-
if (!node.jsDoc) {
1927+
if (!hasJSDocNodes(node)) {
19351928
return;
19361929
}
19371930

0 commit comments

Comments
 (0)