mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
Fix bug: ClassDeclaration not guaranteed to be first declaration of a class (#22983)
* Fix bug: ClassDeclaration not guaranteed to be first declaration of a class * fix test
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
////interface C {}
|
||||
////class C {
|
||||
////}
|
||||
////new C().x = 0;
|
||||
|
||||
verify.codeFix({
|
||||
description: "Declare property 'x'",
|
||||
index: 0,
|
||||
newFileContent:
|
||||
`interface C {}
|
||||
class C {
|
||||
x: number;
|
||||
}
|
||||
new C().x = 0;`,
|
||||
});
|
||||
Reference in New Issue
Block a user