TypeScript/tests/cases/fourslash/codeFixClassExtendAbstractMethodTypeParamsInstantiateNumber.ts

22 lines
423 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
////abstract class A<T> {
2016-11-08 23:26:10 +01:00
//// abstract f(x: T): T;
////}
////
////class C extends A<number> {}
verify.codeFix({
description: "Implement inherited abstract class",
newFileContent:
`abstract class A<T> {
abstract f(x: T): T;
}
2018-01-12 02:43:27 +01:00
class C extends A<number> {
f(x: number): number {
throw new Error("Method not implemented.");
}
}`
});