TypeScript/tests/cases/fourslash/codeFixClassImplementInterfaceOptionalProperty.ts

21 lines
392 B
TypeScript
Raw Normal View History

2017-06-26 21:33:29 +02:00
/// <reference path='fourslash.ts' />
////interface IPerson {
//// name: string;
//// birthday?: string;
////}
////class Person implements IPerson {}
2017-06-26 21:33:29 +02:00
verify.codeFix({
description: "Implement interface 'IPerson'",
newFileContent:
`interface IPerson {
2017-06-26 21:33:29 +02:00
name: string;
birthday?: string;
}
2018-01-12 02:43:27 +01:00
class Person implements IPerson {
name: string;
birthday?: string;
}`,
});