TypeScript/tests/cases/fourslash/codeFixChangeExtendsToImplementsWithDecorator.ts
Andrew Casey afae97ce6e Refine extends-to-implements code fix
1. Retain surrounding trivia when swapping the keyword.
 2. Insert commas at the full-starts, rather than starts, of existing
 keywords when merging with existing implements clauses.

Fixes #18794
2018-01-04 17:55:12 -08:00

18 lines
444 B
TypeScript

/// <reference path='fourslash.ts' />
//// interface I1 { }
//// interface I2 { }
//// function sealed(constructor: Function) {
//// Object.seal(constructor);
//// Object.seal(constructor.prototype);
//// }
//// @sealed
//// [|class A extends I1 implements I2 { }|]
verify.codeFix({
description: "Change 'extends' to 'implements'",
// TODO: GH#18794
newRangeContent: "class A implements I1, I2 { }",
});