File: defaultPropertyAssignedClassWithPrototype.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (40 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (4)
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
=== tests/cases/conformance/salsa/bug39167.js ===
var test = {};
>test : typeof test
>{} : {}

test.K = test.K ||
>test.K = test.K ||    function () {} : typeof K
>test.K : typeof K
>test : typeof test
>K : typeof K
>test.K ||    function () {} : typeof K
>test.K : typeof K
>test : typeof test
>K : typeof K

    function () {}
>function () {} : typeof K

test.K.prototype = {
>test.K.prototype = {    add() {}} : { add(): void; }
>test.K.prototype : { add(): void; }
>test.K : typeof K
>test : typeof test
>K : typeof K
>prototype : { add(): void; }
>{    add() {}} : { add(): void; }

    add() {}
>add : () => void

};

new test.K().add;
>new test.K().add : () => void
>new test.K() : K
>test.K : typeof K
>test : typeof test
>K : typeof K
>add : () => void