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
Somehow, when calling a method that returns never typescript does not handles control flow as we expect. There is nothing in the docs about the never type stating that difference in behavior would show up.
π Expected behavior
Calling a method that returns never should have the same behavior as calling a top level function.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
π Search Terms
never object method not working
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?ts=5.2.2#code/GYVwdgxgLglg9mABMATnAtgFTgBwDICmAbgQDYBi4E8YAFAJQBciYxBKiA3gFCKJQALNAHcWBUQFEUaFLQDkAQwVz63AL7duEBAGcoiOACMAVogC8XXsjToA8iYLQGzViQ48+fQSLGTpcWUVlVT4NDW5QSFgEfgEYHQB1AIBrHWdEPRQYMABzSz5UDGx8NgoqGgZ1TUjoGlj4gBE4Ah0AOTgoJJRk9MzsvI8DEwA6QrsHJ1U1IA
π» Code
π Actual behavior
Somehow, when calling a method that returns
never
typescript does not handles control flow as we expect. There is nothing in the docs about thenever
type stating that difference in behavior would show up.π Expected behavior
Calling a method that returns
never
should have the same behavior as calling a top level function.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: