File: typeFromPropertyAssignment12.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (43 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download
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
=== tests/cases/conformance/salsa/module.js ===
var Outer = function(element, config) {};
>Outer : { (element: any, config: any): void; Pos(line: any, ch: any): Pos; }
>function(element, config) {} : { (element: any, config: any): void; Pos(line: any, ch: any): Pos; }
>element : any
>config : any

=== tests/cases/conformance/salsa/usage.js ===
/** @constructor */
Outer.Pos = function (line, ch) {};
>Outer.Pos = function (line, ch) {} : typeof Pos
>Outer.Pos : typeof Pos
>Outer : { (element: any, config: any): void; Pos(line: any, ch: any): Pos; }
>Pos : typeof Pos
>function (line, ch) {} : typeof Pos
>line : any
>ch : any

/** @type {number} */
Outer.Pos.prototype.line;
>Outer.Pos.prototype.line : any
>Outer.Pos.prototype : any
>Outer.Pos : typeof Pos
>Outer : { (element: any, config: any): void; Pos(line: any, ch: any): Pos; }
>Pos : typeof Pos
>prototype : any
>line : any

var pos = new Outer.Pos(1, 'x');
>pos : Pos
>new Outer.Pos(1, 'x') : Pos
>Outer.Pos : typeof Pos
>Outer : { (element: any, config: any): void; Pos(line: any, ch: any): Pos; }
>Pos : typeof Pos
>1 : 1
>'x' : "x"

pos.line;
>pos.line : number
>pos : Pos
>line : number