TypeScript/tests/cases/fourslash/codeFixClassImplementInterfaceMethodTypePredicate.ts
2018-01-17 15:29:41 -08:00

26 lines
464 B
TypeScript

/// <reference path='fourslash.ts' />
////interface I {
//// f(i: any): i is I;
//// f(): this is I;
////}
////
////class C implements I {}
verify.codeFix({
description: "Implement interface 'I'",
newFileContent:
`interface I {
f(i: any): i is I;
f(): this is I;
}
class C implements I {
f(i: any): i is I;
f(): this is I;
f(i?: any) {
throw new Error("Method not implemented.");
}
}`,
});