mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
fix(isolated_declarations): correct emit for private static methods (#4064)
This commit is contained in:
parent
1681b11adb
commit
1b8f208572
3 changed files with 11 additions and 1 deletions
|
|
@ -142,6 +142,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
|||
&self,
|
||||
r#type: PropertyDefinitionType,
|
||||
key: PropertyKey<'a>,
|
||||
r#static: bool,
|
||||
r#override: bool,
|
||||
accessibility: Option<TSAccessibility>,
|
||||
) -> ClassElement<'a> {
|
||||
|
|
@ -151,7 +152,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
|||
key,
|
||||
None,
|
||||
false,
|
||||
false,
|
||||
r#static,
|
||||
false,
|
||||
r#override,
|
||||
false,
|
||||
|
|
@ -205,6 +206,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
|||
self.create_class_property(
|
||||
r#type,
|
||||
self.ast.copy(&method.key),
|
||||
method.r#static,
|
||||
method.r#override,
|
||||
self.transform_accessibility(method.accessibility),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ export abstract class Qux {
|
|||
export class Baz {
|
||||
readonly prop1 = 'some string';
|
||||
prop2 = 'another string';
|
||||
private prop3 = 'yet another string';
|
||||
private prop4(): void {}
|
||||
private static prop5 = 'yet another string';
|
||||
private static prop6(): void {}
|
||||
}
|
||||
|
||||
export class Boo {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ export declare abstract class Qux {
|
|||
export declare class Baz {
|
||||
readonly prop1: 'some string';
|
||||
prop2: string;
|
||||
private prop3;
|
||||
private prop4;
|
||||
private static prop5;
|
||||
private static prop6;
|
||||
}
|
||||
export declare class Boo {
|
||||
readonly prop: number;
|
||||
|
|
|
|||
Loading…
Reference in a new issue