jsigbiz / spec

JavaScript signature notation
130 stars 6 forks source link

Update return values to demonstrate compound types #25

Closed Raynos closed 10 years ago

Raynos commented 10 years ago

I've changed the named function into a labeled function.

This again simplifies jsig so that there are only labeled types and not named types.

I've removed explicit function overloading, you cannot define the same label or named function multiple times.

Instead you can use the compound type syntax that already exists to state that the label fooAsync implements both signatures.

This simplifies jsig so that there are only compound types and not function overloading.

cc @jden @Matt-Esch

junosuarez commented 10 years ago

Great work! Compound types is better than overloading.