12 lines
255 B
TypeScript
12 lines
255 B
TypeScript
//// [genericWithCallSignatureReturningSpecialization.ts]
|
|
interface B<T> {
|
|
f(): B<number>;
|
|
(value: T): void;
|
|
}
|
|
var x: B<boolean>;
|
|
x(true); // was error
|
|
|
|
|
|
//// [genericWithCallSignatureReturningSpecialization.js]
|
|
var x;
|
|
x(true); // was error
|