TypeScript/tests/cases/fourslash/codeFixUndeclaredIndexSignatureNumericLiteral.ts

17 lines
310 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
//// [|class A {
//// constructor() {
//// this.x = 10;
//// }
//// }|]
verify.rangeAfterCodeFix(`
class A {
2017-03-15 17:06:59 +01:00
[x: string]: number;
constructor() {
this.x = 10;
}
}
`, /*includeWhiteSpace*/ false, /*errorCode*/ undefined, /*index*/ 1);