File: instanceofOperatorWithLHSIsObject.types

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (46 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (5)
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
=== tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts ===
class C { }
>C : C

var x1: any;
>x1 : any

var x2: Function;
>x2 : Function

var a: {};
>a : {}

var b: Object;
>b : Object

var c: C;
>c : C

var d: string | C;
>d : string | C

var r1 = a instanceof x1;
>r1 : boolean
>a instanceof x1 : boolean
>a : {}
>x1 : any

var r2 = b instanceof x2;
>r2 : boolean
>b instanceof x2 : boolean
>b : Object
>x2 : Function

var r3 = c instanceof x1;
>r3 : boolean
>c instanceof x1 : boolean
>c : C
>x1 : any

var r4 = d instanceof x1;
>r4 : boolean
>d instanceof x1 : boolean
>d : string | C
>x1 : any