Closed
Description
Bug Report
π Search Terms
private declaration
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about and private fields
β― Playground Link
Playground link with relevant code
π» Code
export class UiKitModule {
private data: string = '123';
private getData(params?: string): string {
return this.data;
}
forRoot(params?: string): string {
return this.getData(params) + '4';
}
forChild(params?: string): string {
return this.getData(params) + '5';
}
}
export class UiKitModuleNativePrivate {
#data: string = '123';
#getData(params?: string): string {
return this.#data;
}
forRoot(params?: string): string {
return this.#getData(params) + '4';
}
forChild(params?: string): string {
return this.#getData(params) + '5';
}
}
π Actual behavior
// Output d.ts
export declare class UiKitModule {
private data;
private getData;
forRoot(params?: string): string;
forChild(params?: string): string;
}
export declare class UiKitModuleNativePrivate {
#private;
forRoot(params?: string): string;
forChild(params?: string): string;
}
π Expected behavior
// Output d.ts
export declare class UiKitModule {
private data: string;
private getData(params?: string): string;
forRoot(params?: string): string;
forChild(params?: string): string;
}
export declare class UiKitModuleNativePrivate {
forRoot(params?: string): string;
forChild(params?: string): string;
}