58 lines
1,008 B
Text
58 lines
1,008 B
Text
|
=== tests/cases/conformance/expressions/binaryOperators/instanceofOperator/instanceofOperatorWithRHSIsSubtypeOfFunction.ts ===
|
||
|
interface I extends Function { }
|
||
|
>I : I
|
||
|
>Function : Function
|
||
|
|
||
|
var x: any;
|
||
|
>x : any
|
||
|
|
||
|
var f1: Function;
|
||
|
>f1 : Function
|
||
|
>Function : Function
|
||
|
|
||
|
var f2: I;
|
||
|
>f2 : I
|
||
|
>I : I
|
||
|
|
||
|
var f3: { (): void };
|
||
|
>f3 : () => void
|
||
|
|
||
|
var f4: { new (): number };
|
||
|
>f4 : new () => number
|
||
|
|
||
|
var r1 = x instanceof f1;
|
||
|
>r1 : boolean
|
||
|
>x instanceof f1 : boolean
|
||
|
>x : any
|
||
|
>f1 : Function
|
||
|
|
||
|
var r2 = x instanceof f2;
|
||
|
>r2 : boolean
|
||
|
>x instanceof f2 : boolean
|
||
|
>x : any
|
||
|
>f2 : I
|
||
|
|
||
|
var r3 = x instanceof f3;
|
||
|
>r3 : boolean
|
||
|
>x instanceof f3 : boolean
|
||
|
>x : any
|
||
|
>f3 : () => void
|
||
|
|
||
|
var r4 = x instanceof f4;
|
||
|
>r4 : boolean
|
||
|
>x instanceof f4 : boolean
|
||
|
>x : any
|
||
|
>f4 : new () => number
|
||
|
|
||
|
var r5 = x instanceof null;
|
||
|
>r5 : boolean
|
||
|
>x instanceof null : boolean
|
||
|
>x : any
|
||
|
|
||
|
var r6 = x instanceof undefined;
|
||
|
>r6 : boolean
|
||
|
>x instanceof undefined : boolean
|
||
|
>x : any
|
||
|
>undefined : undefined
|
||
|
|