Closed
Description
class C {
#x = Promise.resolve("")
set myValue(x: Promise<string> | string) {
this.#x = Promise.resolve(x);
}
get myValue() {
return this.#x;
}
}
Should the get
type of myValue
be Promise<string>
or just string | Promise<string>
? Right now it is the latter; but technically, the former provides a more specific type.
Changing this technically would be a breaking change.