-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed as not planned
Labels
Not a DefectThis behavior is one of several equally-correct optionsThis behavior is one of several equally-correct options
Description
π Search Terms
"Symbol", "satisfies", "type inference"
π Version & Regression Information
- This changed between versions v4.9 and latest
β― Playground Link
π» Code
const foo = Symbol(); // The type of foo is typeof foo
const bar = Symbol() satisfies symbol; // The type of bar is symbolπ Actual behavior
Using the satisfies operator with Symbol changes the type of bar to symbol, instead of typeof foo.
π Expected behavior
I expected the satisfies operator to have no effect on type inference, so bar should have the type typeof bar.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Not a DefectThis behavior is one of several equally-correct optionsThis behavior is one of several equally-correct options