Open
Description
π Search Terms
setter only
π Version & Regression Information
- This is the behavior in every version I tried, from 5.7.3 down to 3.3.3333
β― Playground Link
π» Code
const language = {
set current(name: string) {
this.log.push(name);
},
log: [] as string[],
};
language.current = "FR";
const c = language.current;
π Actual behavior
Variable c
is said to be of type string
.
π Expected behavior
As clearly stated here, it should be undefined
.
Note that
current
is not defined, and any attempts to access it will result inundefined
.
Additional information about the issue
No response