TypeScript/tests/cases/fourslash/codeFixPropertyOverrideAccess3.ts
Nathan Shively-Sanders e466bb94c1 Fix multi-file usage
1. Follow aliases with getSupers.
2. Make fix in file with superclass, not with the error.
2020-05-22 09:06:05 -07:00

29 lines
548 B
TypeScript

/// <reference path='fourslash.ts' />
// @strict: true
// @Filename: foo.ts
//// import { A } from './source'
//// class B extends A {
//// get x() { return 2 }
//// }
// @Filename: source.ts
//// export class A {
//// x = 1
//// }
verify.codeFix({
description: `Generate 'get' and 'set' accessors`,
newFileContent: {
'/tests/cases/fourslash/source.ts': `export class A {
private _x = 1;
public get x() {
return this._x;
}
public set x(value) {
this._x = value;
}
}`},
index: 0
})