Skip to content

Commit 4309c0e

Browse files
author
Andy
authored
Fix bug: ClassDeclaration not guaranteed to be first declaration of a class (microsoft#22983)
* Fix bug: ClassDeclaration not guaranteed to be first declaration of a class * fix test
1 parent 793f469 commit 4309c0e

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////interface C {}
4+
////class C {
5+
////}
6+
////new C().x = 0;
7+
8+
verify.codeFix({
9+
description: "Declare property 'x'",
10+
index: 0,
11+
newFileContent:
12+
`interface C {}
13+
class C {
14+
x: number;
15+
}
16+
new C().x = 0;`,
17+
});

0 commit comments

Comments
 (0)