TypeScript/tests/cases/fourslash/codeFixUndeclaredPropertyFunctionEmptyClass.ts
2017-02-16 13:37:35 -08:00

21 lines
463 B
TypeScript

/// <reference path='fourslash.ts' />
//// [|class A {
//// constructor() {
//// this.x = function(x: number, y?: A){
//// return x > 0 ? x : y;
//// }
//// }
//// }|]
verify.rangeAfterCodeFix(`
class A {
x: (x: number, y?: A) => A;
constructor() {
this.x = function(x: number, y?: A){
return x > 0 ? x : y;
}
}
}
`, /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 0);