You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Array.prototype.at", "Array.at", "item located at the specified index", "intersection", "union", "union type", "subset"
🕗 Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about everything (it's very interesting) but I could not find anything related.
🔎 Search Terms
"Array.prototype.at", "Array.at", "item located at the specified index", "intersection", "union", "union type", "subset"
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?target=99&ts=5.7.0-dev.20241026#code/C4TwDgpgBAggTnAhiGUC8UDeVEC4oCMUAvgNoC6A3ALABQoksCyAQullAEb4BMJFNWnQAmEAMYAbRHGhiA9gDsAzsBwIC+eEhRQAPk20tBdectVj20uAVIAGKnQD0jqK6gA9APxOXAdTlwANZKJooqUMKW6gB0iMAAFLYAlILObh7etACWAGZQ8cJJWHSuAEScpVBZChFQnhHRnFD4paI5iACuEqoAbogSHRClgq5p6eMZJVBjE25NWUpQPHTEdD5QACJyEIsKcqoA7gGBdAzQWsgAouzYEPhEZA704OfMIABiN1B3hJRQObx+E8ROIpDIoKZwlYeJo3td9BcPsZaJDVABzKJwHh2J4zSYosKqAAWmJ4sQSyVSLjcXjouXyRKKmCmpRylWqUBJ9SJ0TyLTanW6UD6AyGI2m1NmrlptFGkqleQWUA6CkCewOChWdCAA
💻 Code
🙁 Actual behavior
In the example,
const h
type is only an intersection of those two types. Therefore,f
property is unknown.🙂 Expected behavior
const h
should a union type of those two types andf
property should be 2.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: