Skip to content

Commit 29f3f6f

Browse files
Merge branch 'master' into typeWriter
2 parents b5b9f51 + c767e0f commit 29f3f6f

File tree

2,407 files changed

+85794
-85779
lines changed

Some content is hidden

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

2,407 files changed

+85794
-85779
lines changed

src/harness/typeWriter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class TypeWriterWalker {
4949
var symbolString = "Symbol(" + this.checker.symbolToString(symbol, node.parent);
5050
if (symbol.declarations) {
5151
for (let declaration of symbol.declarations) {
52-
symbolString += ",";
52+
symbolString += ", ";
5353
let declSourceFile = declaration.getSourceFile();
5454
let declLineAndCharacter = declSourceFile.getLineAndCharacterOfPosition(declaration.pos);
55-
symbolString += `Decl(${ ts.getBaseFileName(declSourceFile.fileName) },${ declLineAndCharacter.line },${ declLineAndCharacter.character })`
55+
symbolString += `Decl(${ ts.getBaseFileName(declSourceFile.fileName) }, ${ declLineAndCharacter.line }, ${ declLineAndCharacter.character })`
5656
}
5757
}
5858
symbolString += ")";

src/services/services.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,6 +3793,10 @@ module ts {
37933793
return undefined;
37943794
}
37953795

3796+
if (isLabelName(node)) {
3797+
return undefined;
3798+
}
3799+
37963800
let symbol = typeInfoResolver.getSymbolAtLocation(node);
37973801
if (!symbol) {
37983802
// Try getting just type at this position and show
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
=== tests/cases/compiler/2dArrays.ts ===
22
class Cell {
3-
>Cell : Cell, Symbol(Cell,Decl(2dArrays.ts,0,0))
3+
>Cell : Cell, Symbol(Cell, Decl(2dArrays.ts, 0, 0))
44
}
55

66
class Ship {
7-
>Ship : Ship, Symbol(Ship,Decl(2dArrays.ts,1,1))
7+
>Ship : Ship, Symbol(Ship, Decl(2dArrays.ts, 1, 1))
88

99
isSunk: boolean;
10-
>isSunk : boolean, Symbol(isSunk,Decl(2dArrays.ts,3,12))
10+
>isSunk : boolean, Symbol(isSunk, Decl(2dArrays.ts, 3, 12))
1111
}
1212

1313
class Board {
14-
>Board : Board, Symbol(Board,Decl(2dArrays.ts,5,1))
14+
>Board : Board, Symbol(Board, Decl(2dArrays.ts, 5, 1))
1515

1616
ships: Ship[];
17-
>ships : Ship[], Symbol(ships,Decl(2dArrays.ts,7,13))
18-
>Ship : Ship, Symbol(Ship,Decl(2dArrays.ts,1,1))
17+
>ships : Ship[], Symbol(ships, Decl(2dArrays.ts, 7, 13))
18+
>Ship : Ship, Symbol(Ship, Decl(2dArrays.ts, 1, 1))
1919

2020
cells: Cell[];
21-
>cells : Cell[], Symbol(cells,Decl(2dArrays.ts,8,18))
22-
>Cell : Cell, Symbol(Cell,Decl(2dArrays.ts,0,0))
21+
>cells : Cell[], Symbol(cells, Decl(2dArrays.ts, 8, 18))
22+
>Cell : Cell, Symbol(Cell, Decl(2dArrays.ts, 0, 0))
2323

2424
private allShipsSunk() {
25-
>allShipsSunk : () => boolean, Symbol(allShipsSunk,Decl(2dArrays.ts,9,18))
25+
>allShipsSunk : () => boolean, Symbol(allShipsSunk, Decl(2dArrays.ts, 9, 18))
2626

2727
return this.ships.every(function (val) { return val.isSunk; });
2828
>this.ships.every(function (val) { return val.isSunk; }) : boolean
29-
>this.ships.every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean, Symbol(Array.every,Decl(lib.d.ts,1094,62))
30-
>this.ships : Ship[], Symbol(ships,Decl(2dArrays.ts,7,13))
31-
>this : Board, Symbol(Board,Decl(2dArrays.ts,5,1))
32-
>ships : Ship[], Symbol(ships,Decl(2dArrays.ts,7,13))
33-
>every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean, Symbol(Array.every,Decl(lib.d.ts,1094,62))
29+
>this.ships.every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean, Symbol(Array.every, Decl(lib.d.ts, 1094, 62))
30+
>this.ships : Ship[], Symbol(ships, Decl(2dArrays.ts, 7, 13))
31+
>this : Board, Symbol(Board, Decl(2dArrays.ts, 5, 1))
32+
>ships : Ship[], Symbol(ships, Decl(2dArrays.ts, 7, 13))
33+
>every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean, Symbol(Array.every, Decl(lib.d.ts, 1094, 62))
3434
>function (val) { return val.isSunk; } : (val: Ship) => boolean
35-
>val : Ship, Symbol(val,Decl(2dArrays.ts,12,42))
36-
>val.isSunk : boolean, Symbol(Ship.isSunk,Decl(2dArrays.ts,3,12))
37-
>val : Ship, Symbol(val,Decl(2dArrays.ts,12,42))
38-
>isSunk : boolean, Symbol(Ship.isSunk,Decl(2dArrays.ts,3,12))
35+
>val : Ship, Symbol(val, Decl(2dArrays.ts, 12, 42))
36+
>val.isSunk : boolean, Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12))
37+
>val : Ship, Symbol(val, Decl(2dArrays.ts, 12, 42))
38+
>isSunk : boolean, Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12))
3939
}
4040
}

tests/baselines/reference/APISample_compile.types

Lines changed: 83 additions & 83 deletions
Large diffs are not rendered by default.

tests/baselines/reference/APISample_linter.types

Lines changed: 171 additions & 171 deletions
Large diffs are not rendered by default.

tests/baselines/reference/APISample_transform.types

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,38 @@
77
*/
88

99
declare var console: any;
10-
>console : any, Symbol(console,Decl(APISample_transform.ts,7,11))
10+
>console : any, Symbol(console, Decl(APISample_transform.ts, 7, 11))
1111

1212
import * as ts from "typescript";
13-
>ts : typeof ts, Symbol(ts,Decl(APISample_transform.ts,9,6))
13+
>ts : typeof ts, Symbol(ts, Decl(APISample_transform.ts, 9, 6))
1414

1515
const source = "let x: string = 'string'";
16-
>source : string, Symbol(source,Decl(APISample_transform.ts,11,5))
16+
>source : string, Symbol(source, Decl(APISample_transform.ts, 11, 5))
1717
>"let x: string = 'string'" : string
1818

1919
let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
20-
>result : string, Symbol(result,Decl(APISample_transform.ts,13,3))
20+
>result : string, Symbol(result, Decl(APISample_transform.ts, 13, 3))
2121
>ts.transpile(source, { module: ts.ModuleKind.CommonJS }) : string
22-
>ts.transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile,Decl(typescript.d.ts,1729,5))
23-
>ts : typeof ts, Symbol(ts,Decl(APISample_transform.ts,9,6))
24-
>transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile,Decl(typescript.d.ts,1729,5))
25-
>source : string, Symbol(source,Decl(APISample_transform.ts,11,5))
22+
>ts.transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile, Decl(typescript.d.ts, 1729, 5))
23+
>ts : typeof ts, Symbol(ts, Decl(APISample_transform.ts, 9, 6))
24+
>transpile : (input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]) => string, Symbol(ts.transpile, Decl(typescript.d.ts, 1729, 5))
25+
>source : string, Symbol(source, Decl(APISample_transform.ts, 11, 5))
2626
>{ module: ts.ModuleKind.CommonJS } : { [x: string]: ts.ModuleKind; module: ts.ModuleKind; }
27-
>module : ts.ModuleKind, Symbol(module,Decl(APISample_transform.ts,13,35))
28-
>ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS,Decl(typescript.d.ts,1108,17))
29-
>ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind,Decl(typescript.d.ts,1106,5))
30-
>ts : typeof ts, Symbol(ts,Decl(APISample_transform.ts,9,6))
31-
>ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind,Decl(typescript.d.ts,1106,5))
32-
>CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS,Decl(typescript.d.ts,1108,17))
27+
>module : ts.ModuleKind, Symbol(module, Decl(APISample_transform.ts, 13, 35))
28+
>ts.ModuleKind.CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17))
29+
>ts.ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5))
30+
>ts : typeof ts, Symbol(ts, Decl(APISample_transform.ts, 9, 6))
31+
>ModuleKind : typeof ts.ModuleKind, Symbol(ts.ModuleKind, Decl(typescript.d.ts, 1106, 5))
32+
>CommonJS : ts.ModuleKind, Symbol(ts.ModuleKind.CommonJS, Decl(typescript.d.ts, 1108, 17))
3333

3434
console.log(JSON.stringify(result));
3535
>console.log(JSON.stringify(result)) : any
3636
>console.log : any
37-
>console : any, Symbol(console,Decl(APISample_transform.ts,7,11))
37+
>console : any, Symbol(console, Decl(APISample_transform.ts, 7, 11))
3838
>log : any
3939
>JSON.stringify(result) : string
40-
>JSON.stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }, Symbol(JSON.stringify,Decl(lib.d.ts,964,70),Decl(lib.d.ts,969,34),Decl(lib.d.ts,975,78),Decl(lib.d.ts,981,51),Decl(lib.d.ts,988,90))
41-
>JSON : JSON, Symbol(JSON,Decl(lib.d.ts,955,42),Decl(lib.d.ts,1000,11))
42-
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }, Symbol(JSON.stringify,Decl(lib.d.ts,964,70),Decl(lib.d.ts,969,34),Decl(lib.d.ts,975,78),Decl(lib.d.ts,981,51),Decl(lib.d.ts,988,90))
43-
>result : string, Symbol(result,Decl(APISample_transform.ts,13,3))
40+
>JSON.stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }, Symbol(JSON.stringify, Decl(lib.d.ts, 964, 70), Decl(lib.d.ts, 969, 34), Decl(lib.d.ts, 975, 78), Decl(lib.d.ts, 981, 51), Decl(lib.d.ts, 988, 90))
41+
>JSON : JSON, Symbol(JSON, Decl(lib.d.ts, 955, 42), Decl(lib.d.ts, 1000, 11))
42+
>stringify : { (value: any): string; (value: any, replacer: (key: string, value: any) => any): string; (value: any, replacer: any[]): string; (value: any, replacer: (key: string, value: any) => any, space: any): string; (value: any, replacer: any[], space: any): string; }, Symbol(JSON.stringify, Decl(lib.d.ts, 964, 70), Decl(lib.d.ts, 969, 34), Decl(lib.d.ts, 975, 78), Decl(lib.d.ts, 981, 51), Decl(lib.d.ts, 988, 90))
43+
>result : string, Symbol(result, Decl(APISample_transform.ts, 13, 3))
4444

0 commit comments

Comments
 (0)