Closed
Description
Bug Report
π Search Terms
private field declaration
π Version & Regression Information
v3.8.3, v4.5.4, v4.6.0-dev.20220116
β― Playground Link
Playground link with relevant code
π» Code
export function func() {
return class A {
#field = ''
}
}
π Actual behavior
In watch mode, the name of the private field in the declaration file is not consistent after rebuild.
The initial build emits the following declaration:
export declare function func(): {
new (): {
"__#1@#field": string;
};
};
Do some changes in the source file, for example:
export function func() {
return class A {
#field = 'a'
}
}
The output becomes:
export declare function func(): {
new (): {
"__#12@#field": string;
};
};
Undo the change. The output becomes:
export declare function func(): {
new (): {
"__#16@#field": string;
};
};
The number in the emitted private field name seems to increase after each rebuild.
π Expected behavior
The emitted private field name is consistent across rebuild and should be named #private
.
export declare function func(): {
new (): {
#private;
};
};