50 lines
758 B
Text
50 lines
758 B
Text
=== tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithLHSIsObject.ts ===
|
|
class C { }
|
|
>C : C
|
|
|
|
var x1: any;
|
|
>x1 : any
|
|
|
|
var x2: Function;
|
|
>x2 : Function
|
|
>Function : Function
|
|
|
|
var a: {};
|
|
>a : {}
|
|
|
|
var b: Object;
|
|
>b : Object
|
|
>Object : Object
|
|
|
|
var c: C;
|
|
>c : C
|
|
>C : C
|
|
|
|
var d: string | C;
|
|
>d : string | C
|
|
>C : 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
|
|
|