mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +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,
|
&self,
|
||||||
r#type: PropertyDefinitionType,
|
r#type: PropertyDefinitionType,
|
||||||
key: PropertyKey<'a>,
|
key: PropertyKey<'a>,
|
||||||
|
r#static: bool,
|
||||||
r#override: bool,
|
r#override: bool,
|
||||||
accessibility: Option<TSAccessibility>,
|
accessibility: Option<TSAccessibility>,
|
||||||
) -> ClassElement<'a> {
|
) -> ClassElement<'a> {
|
||||||
|
|
@ -151,7 +152,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
||||||
key,
|
key,
|
||||||
None,
|
None,
|
||||||
false,
|
false,
|
||||||
false,
|
r#static,
|
||||||
false,
|
false,
|
||||||
r#override,
|
r#override,
|
||||||
false,
|
false,
|
||||||
|
|
@ -205,6 +206,7 @@ impl<'a> IsolatedDeclarations<'a> {
|
||||||
self.create_class_property(
|
self.create_class_property(
|
||||||
r#type,
|
r#type,
|
||||||
self.ast.copy(&method.key),
|
self.ast.copy(&method.key),
|
||||||
|
method.r#static,
|
||||||
method.r#override,
|
method.r#override,
|
||||||
self.transform_accessibility(method.accessibility),
|
self.transform_accessibility(method.accessibility),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ export abstract class Qux {
|
||||||
export class Baz {
|
export class Baz {
|
||||||
readonly prop1 = 'some string';
|
readonly prop1 = 'some string';
|
||||||
prop2 = 'another 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 {
|
export class Boo {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ export declare abstract class Qux {
|
||||||
export declare class Baz {
|
export declare class Baz {
|
||||||
readonly prop1: 'some string';
|
readonly prop1: 'some string';
|
||||||
prop2: string;
|
prop2: string;
|
||||||
|
private prop3;
|
||||||
|
private prop4;
|
||||||
|
private static prop5;
|
||||||
|
private static prop6;
|
||||||
}
|
}
|
||||||
export declare class Boo {
|
export declare class Boo {
|
||||||
readonly prop: number;
|
readonly prop: number;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue