TypeScript/tests/baselines/reference/genericWithCallSignatures1.types
2014-08-18 19:56:03 -07:00

41 lines
936 B
Plaintext

=== tests/cases/compiler/genericWithCallSignatures_1.ts ===
///<reference path="genericWithCallSignatures_0.ts"/>
class MyClass {
>MyClass : MyClass
public callableThing: CallableExtention<string>;
>callableThing : CallableExtention<string>
>CallableExtention : CallableExtention<T>
public myMethod() {
>myMethod : () => void
var x = <string> this.callableThing();
>x : string
><string> this.callableThing() : string
>this.callableThing() : string
>this.callableThing : CallableExtention<string>
>this : MyClass
>callableThing : CallableExtention<string>
}
}
=== tests/cases/compiler/genericWithCallSignatures_0.ts ===
interface Callable<T> {
>Callable : Callable<T>
>T : T
(): T;
>T : T
(value: T): void;
>value : T
>T : T
}
interface CallableExtention<T> extends Callable<T> { }
>CallableExtention : CallableExtention<T>
>T : T
>Callable : Callable<T>
>T : T