Add test for typed constructor (#7377)

Closes https://github.com/prettier/prettier/issues/4111
This commit is contained in:
Jed Fox authored and GitHub committed 2020-01-17 10:26:11 -05:00
1 parent 748ebbf0bf
commit 524cd96fee
2 files changed
+21

No files matched your search

@@ -14,6 +14,13 @@ class foo {
constructor(export a: number) {}
}
class A {
'constructor': typeof A
static Foo() {
return new A()
}
}
=====================================output=====================================
class foo {
constructor(static a: number) {}
@@ -23,6 +30,13 @@ class foo {
constructor(export a: number) {}
}
class A {
"constructor": typeof A;
static Foo() {
return new A();
}
}
================================================================================
`;
+7
View File
@@ -5,3 +5,10 @@ class foo {
class foo {
constructor(export a: number) {}
}
class A {
'constructor': typeof A
static Foo() {
return new A()
}
}