microsoft / microsoft/TypeScript
Private members have implicit any type in generated declaration files
Aperta
@sandersn ci sta già lavorando.
Dal 27/3/2020.
Needs Investigation
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
It seems the bug that was fixed in #36216 is happening again:
When generating delcarations for private class members, no type information is appended which causes the declaration file to generate errors when imported into a project with noImplicitAny enabled.
TypeScript Version: 3.8.3
Code
// Test.ts
export default class Test {
private _number: number = 0;
public str: string = '';
private get num() { return this._number; }
}
Expected behavior:
// Test.d.ts
export default class Test {
private num: any;
str: string;
private get num(): any;
}
Actual behavior:
// Test.d.ts
export default class Test {
private _number;
str: string;
private get num();
}
Related Issues: #36216, #36639
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.