minor fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-10-28 14:08:26 +03:00
parent 28de104079
commit fc11d94c35
2 changed files with 9 additions and 5 deletions

View File

@ -284,12 +284,16 @@ module.PureEvent =
object.Constructor('PureEvent', Event, {
toString: function(){
return `PureEvent ${this.name}(){}`},
__init__: function(name, options={}){
__init__: function(name, func, options={}){
if(typeof(func) != 'function'){
options = func
func = undefined }
object.parentCall(PureEvent.prototype.__init__, this,
name,
function(handle, trigger){
trigger === module.TRIGGER
|| handle(false) }, options) },
function(handle, trigger, args){
trigger === module.TRIGGER ?
func && func.call(this, handle, ...args)
: handle(false) }, options) },
})

View File

@ -1,6 +1,6 @@
{
"name": "ig-types",
"version": "6.20.2",
"version": "6.20.3",
"description": "Generic JavaScript types and type extensions...",
"main": "main.js",
"scripts": {