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:
Andy
2018-03-29 14:55:22 -07:00
committed by GitHub
parent 793f4696a4
commit 4309c0e7f8

View File

@@ -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;`,
});