Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
1) Would you like to clarify? I don't quite get what you're saying.
2) Sure, that's true for a constant assignment. But take a variable, how would you do that?
const a = b.slice(0, 1)?
const a = [b]?
1) I agree, that should work... There should always be an underlying implementation like this which means that your code shouldn't throw:
function f(x: number|string): number|string