💻
What problem are you trying to solve?
TypeScript 4.7 now allows us to perform typeof queries on private fields.
class Container {
#data = "hello!";
get data(): typeof this.#data {
return this.#data;
}
set data(value: typeof this.#data) {
this.#data = value;
}
}
Describe the solution you'd like
Describe alternatives you've considered
Documentation, Adoption, Migration Strategy
https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#typeof-on-private-fields
💻
What problem are you trying to solve?
TypeScript 4.7 now allows us to perform typeof queries on private fields.
Describe the solution you'd like
Describe alternatives you've considered
Documentation, Adoption, Migration Strategy
https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#typeof-on-private-fields