- Implemented function
create
to create a new instance of typed-function.
- Performance improvements.
- Fixed generated internal Signature and Param objects not being cleaned up after the typed function has been generated.
- Fixed a bug sometimes not ordering the handling of any type arguments last.
- Fixed a bug sometimes not choosing the signature with the lowest number of conversions.
- Large code refactoring.
- Fixed bugs related to any type parameters.
- Removed the configuration option
minify
(it's not clear yet whether minifying really improves the performance). - Internal code simplifications.
- Bug fixes.
- Implemented support for merging typed functions.
- Typed functions inherit the name of the function in case of one signature.
- Fixed a bug where a regular argument was not matched when there was a signature with variable arguments too.
- Slightly changed the error messages.
- Introduced new constructor options, create a typed function as
typed([name,] signature, fn)
ortyped([name,] signatures)
. - Support for multiple types per parameter like
number | string, number'
. - Support for variable parameters like
sting, ...number'
. - Changed any type notation
'*'
to'any'
. - Implemented detailed error messages.
- Implemented option
typed.config.minify
.
- Renamed module to
typed-function
.
- Implemented support for any type arguments (denoted with
*
).
- Implemented support for named functions.
- Implemented support for type conversions.
- Implemented support for custom types.
- Library packaged as UMD, usable with CommonJS (node.js), AMD, and browser globals.
- Implemented support for functions with zero, one, or multiple arguments.
- First release (no functionality yet)