-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy path2dArrays.types
More file actions
64 lines (56 loc) · 2.05 KB
/
2dArrays.types
File metadata and controls
64 lines (56 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//// [tests/cases/compiler/2dArrays.ts] ////
=== 2dArrays.ts ===
class Cell {
>Cell : Cell
> : ^^^^
}
class Ship {
>Ship : Ship
> : ^^^^
isSunk: boolean = false;
>isSunk : boolean
> : ^^^^^^^
>false : false
> : ^^^^^
}
class Board {
>Board : Board
> : ^^^^^
ships: Ship[] = [];
>ships : Ship[]
> : ^^^^^^
>[] : never[]
> : ^^^^^^^
cells: Cell[] = [];
>cells : Cell[]
> : ^^^^^^
>[] : never[]
> : ^^^^^^^
private allShipsSunk() {
>allShipsSunk : () => boolean
> : ^^^^^^^^^^^^^
return this.ships.every(function (val) { return val.isSunk; });
>this.ships.every(function (val) { return val.isSunk; }) : boolean
> : ^^^^^^^
>this.ships.every : { <S extends Ship>(predicate: (value: Ship, index: number, array: Ship[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: Ship, index: number, array: Ship[]) => unknown, thisArg?: any): boolean; }
> : ^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^
>this.ships : Ship[]
> : ^^^^^^
>this : this
> : ^^^^
>ships : Ship[]
> : ^^^^^^
>every : { <S extends Ship>(predicate: (value: Ship, index: number, array: Ship[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: Ship, index: number, array: Ship[]) => unknown, thisArg?: any): boolean; }
> : ^^^ ^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^ ^ ^^^ ^^^ ^^^^^^^^ ^^ ^^ ^^^^^^^^^^^^^ ^^ ^^^ ^^^ ^^^
>function (val) { return val.isSunk; } : (val: Ship) => boolean
> : ^ ^^^^^^^^^^^^^^^^^^
>val : Ship
> : ^^^^
>val.isSunk : boolean
> : ^^^^^^^
>val : Ship
> : ^^^^
>isSunk : boolean
> : ^^^^^^^
}
}