49 lines
966 B
Text
49 lines
966 B
Text
=== tests/cases/conformance/types/primitives/boolean/extendBooleanInterface.ts ===
|
|
interface Boolean {
|
|
>Boolean : Boolean
|
|
|
|
doStuff(): string;
|
|
>doStuff : () => string
|
|
|
|
doOtherStuff<T>(x: T): T;
|
|
>doOtherStuff : <T>(x: T) => T
|
|
>T : T
|
|
>x : T
|
|
>T : T
|
|
>T : T
|
|
}
|
|
|
|
var x = true;
|
|
>x : boolean
|
|
>true : boolean
|
|
|
|
var a: string = x.doStuff();
|
|
>a : string
|
|
>x.doStuff() : string
|
|
>x.doStuff : () => string
|
|
>x : boolean
|
|
>doStuff : () => string
|
|
|
|
var b: string = x.doOtherStuff('hm');
|
|
>b : string
|
|
>x.doOtherStuff('hm') : string
|
|
>x.doOtherStuff : <T>(x: T) => T
|
|
>x : boolean
|
|
>doOtherStuff : <T>(x: T) => T
|
|
>'hm' : string
|
|
|
|
var c: string = x['doStuff']();
|
|
>c : string
|
|
>x['doStuff']() : string
|
|
>x['doStuff'] : () => string
|
|
>x : boolean
|
|
>'doStuff' : string
|
|
|
|
var d: string = x['doOtherStuff']('hm');
|
|
>d : string
|
|
>x['doOtherStuff']('hm') : string
|
|
>x['doOtherStuff'] : <T>(x: T) => T
|
|
>x : boolean
|
|
>'doOtherStuff' : string
|
|
>'hm' : string
|
|
|