Changelog
[0.3.1] - Mar 2nd, 2018
Changelog
[0.3.0] - Feb 23th, 2018, RISKY
Changelog
[0.2.1] - Nov, 2017
Changelog
[0.2.0] - 2017-06, Mutable Param
Since this section, programmers are allowed to use mutable param. E.g.
overload2()
.overload('+', Function, function(/*Array*/ data, callback) {
// ...
})
.overload(Error, '*', function(err, /*Array*/ rest) {
// ...
})
For more details, see the testcase named mutable.js.
ATTENTION:
Before, '*'
is alias of overload2.Type.ANY
. And now, it is mapped to any number of arguments of any type.
Next bugs have been fixed in this version:
Failed to run the default method when no predefined paramlist matched.
In previous version, TypeError: Cannot read property 'apply' of undefined
will be thrown when overload2 tries to execute the default method.
Changelog
[0.1.0] - 2017-06
Predefined datatypes are moved from overload2.*
to overload2.Type.*
.
Changelog
[0.0.3] - 2017-05
overload2()
will create a new overloaded function. Before, in v0.0.2, the overloaded function may be appended with an implementation meanwhile being created, if overload2()
is called with arguments. This pattern is not only ambiguous, but also restrict the future expandability of overload2 (arguments passed to overload2()
SHOULD be used to define attributes concerned with overloading, instead of specific implementation). So, since this version, overload2()
will return an overloaded function WITHOUT ANY IMPLEMENTATION. And programmers must implement it by calling .overload()
method.