Hacker News new | ask | show | jobs
by delaaxe 1194 days ago
There must be a mistake in the "Exact Optional Property Types" section?
1 comments

Hey, if you think you found a mistake, please also tell me what it is so I can fix it.
The error message talks about having flags set wrong and doesn't complain about anything the code is doing.

Also your code for "Tuple Optional Elements and Rest" is broken. Pad is declared twice and it's returning the wrong thing.

Thanks, I fixed both of them.
I think you mean to have undefined after the equal sign, otherwise I don’t see how there could be an error
Yes, the error was also wrong, fixed it.
I'd also assign undefined to 'age' to show that it's not erroring
Good point, done.