Closed as not planned
Description
openedon Jan 4, 2024
π Search Terms
never parameter argument
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about 'never'
β― Playground Link
π» Code
function foo(bar : string) {
console.log(bar);
}
function getNever() : never {
throw new Error(`Nope`);
}
foo(getNever());
π Actual behavior
No type errors
π Expected behavior
Type error: can not pass type never to function foo
Additional information about the issue
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment