paldepind / union-type

A small JavaScript library for defining and using union types.
MIT License
477 stars 28 forks source link

Improve type error messages #42

Closed pelotom closed 8 years ago

pelotom commented 8 years ago
paldepind commented 8 years ago

Yes. The current error messages are a bit weird. Throwing when too many arguments is given is a great idea.

I've left a single nitpicking comment.

paldepind commented 8 years ago

Thank you for this PR! Sorry for the delayed merge. I didn't realise that you had committed another change.