Add test for typed constructor (#7377)
Closes https://github.com/prettier/prettier/issues/4111
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
|
||||
@@ -5,3 +5,10 @@ class foo {
|
||||
class foo {
|
||||
constructor(export a: number) {}
|
||||
}
|
||||
|
||||
class A {
|
||||
'constructor': typeof A
|
||||
static Foo() {
|
||||
return new A()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user