Closed alesmenzel closed 1 year ago
Duplicate of #14520.
Actually there is even better example
const set = new Set(['foo', 'bar'] as const)
set.has('baz')
// Argument of type '"baz"' is not assignable to parameter of type '"foo" | "bar"'.(2345)
Still a duplicate of the linked issue. :-)
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
Bug Report
🔎 Search Terms
tuple, readonly, const, includes
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
We cannot check whether elements are included in a read-only tuple.
🙂 Expected behavior
We can check whether elements are not included in a read-only tuple.