sirisian / ecmascript-types

ECMAScript Optional Static Typing Proposal http://sirisian.github.io/ecmascript-types/
453 stars 4 forks source link

Make function overloading, parameters, optional, and default parameters more clear #28

Closed sirisian closed 5 years ago

sirisian commented 6 years ago

Right now there could be confusion about these topics. I use default parameters, but I don't explain what happens if one doesn't pass sufficient arguments. to parameters without defaults.

sirisian commented 5 years ago

https://github.com/sirisian/ecmascript-types#function-overloading

Added examples with default parameters and ambiguous functions along with clarifying that untyped functions are a catch all while typed functions must match their signature to their arguments.