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
I don't see a correlation to #44366 . It's not a bug - your test case is using typeof with two different values and an or condition. Everything is matched by that, even if - let's say - you pass a boolean to this function then it won't be matched by typeof arg !== 'boolean' but will be matched by the alternative condition: typeof arg !== 'string'
π Search Terms
typeguard typeof unknown not or never
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/FAMwrgdgxgLglgewgAhgBgBQEMBOBzALmUgGsIEB3CASiIGcYc4I9kBvYZL5OEZDVAE8ADgFMEfXKwCEAXlnIA5ACMECADaisERcmrtO3I1CQNkg5AqkBuQ0a45RMMDhSLFtowF9gd5CYgzAC9LZBs-R2dXJQ9gH1BIWEQUGABGbHwiUnIqWmQGJhYDI15+ITEJMPxkOQUVNU1tXQAfZvLxSWrapQLmPF19DntuALMLK3xPYeRIlzdY719jUxhkEIm8a2QAem3kACEAVQBxegALBDB1ABNkZVE7hq0IZt6i5gYtW8qIUQA3UQ4fjqOAkB7MVAAVmoESccxitni4Gg8CQqAAzBlCMQIGRKDR6Iw+sVuKUBDARB0qjJ5EpVBpnroAGRM9qVKQ1WmKN79PQk4ajVbjalTYazaLuUXIeLLQKrdYi2FReaI3zIpJomAAFixWVxOQJ+SJRSGpL45Mp7Oq8jq9MaOj5poFK3MoXC0xmcIlC24MpGLoV7u44pVcTViVRKUhupxeNyhMKrCdPHNbM6rBtdKeTWQrTT1MsXJ5A359kFro2UqMIYRfj9XHLgcmSvhkrDQAπ» Code
removedπ Actual behavior
line 18 "z" is "never"
π Expected behavior
line 18 "z" is "boolean|string"
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: