You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Test {
private test(a: string);
private test(a: number);
private test(a: any) {
console.log(a);
}
public test2(a: string);
public test2(a: number);
public test2(a: any) {
console.log(a);
}
}
new Test();
is compiled with the --declaration flag the output is:
declare class Test {
private test(a);
private test(a);
test2(a: string): any;
test2(a: number): any;
}
the type information is missing from test.
The text was updated successfully, but these errors were encountered:
That is by design. Private members are emitted in a declaration file to indicate that a private property with that name exists so that a derived class doesn't accidentally use the name (which would step on the private members). Since derived classes can't actually access inherited private members there is no reason to reveal their real types. Indeed, the private members may have non-exported types so it might not even be possible to include their real types.
When this code:
is compiled with the --declaration flag the output is:
the type information is missing from
test
.The text was updated successfully, but these errors were encountered: