Closed killercup closed 9 years ago
hmm that's weird, I've actually not seen that syntax, I've been using:
function lol (settings: Object = {}) {}
Interesting. For some reason that syntax even looks a bit better than my version. (It's still odd that they both seem to work.) I'll just use your variant, then!
Charles Pick notifications@github.com schrieb am So., 23. Aug. 2015 um 23:18:
hmm that's weird, I've actually not seen that syntax, I've been using:
function lol (settings: Object = {}) {}
— Reply to this email directly or view it on GitHub https://github.com/codemix/babel-plugin-typecheck/issues/15#issuecomment-133938835 .
I guess I just found a weird corner case. Using default parameter values with types generates invalid syntax.
becomes:
which doesn't work because: