Comment

Comment by josh64

I think because the return type hasn't been specified for the function, so it is inferring the return type from the return statement (which means it is "correct").

Don't forget JavaScript (and therefore typescript) will let you concatenate a lot of random types together without error.

parent josh64 6 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton