Skip to content

createjs.d.ts missing signatures for EventDispatcher.dispatchEvent sender #3

@jackpunt

Description

@jackpunt

This is great package!
I'm using it with angular/typescript, and the new typescript compiler is particular, so having the types file is extremely helpful.

However, I found a missing signature.
The EventDispatcher has a 'sender' method: dispatchEvent(Event|string, bubbles?, cancelable?)

Distinct from the 'receiver' methods: dispatchEvent(Event|string|Object, target?))
I'm not sure if the receiver methods are applicable to EventDispatcher, so I left them in.
You may want to check about that.

diff -patch node_modules/createjs-module/createjs.d.ts*
*** node_modules/createjs-module/createjs.d.ts	Mon Jan  1 16:25:47 2018
--- node_modules/createjs-module/createjs.d.ts.~1~	Mon Oct  9 15:53:47 2017
*************** declare namespace createjs {
*** 68,75 ****
          addEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): Function;
          addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean; }, useCapture?: boolean): Object;
          addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void; }, useCapture?: boolean): Object;
-         dispatchEvent(eventObj: Object, bubbles?: boolean, cancelable?: boolean): boolean; //Object | String | Event
-         dispatchEvent(eventObj: string, bubbles?: boolean, cancelable?: boolean): boolean;
          dispatchEvent(eventObj: Object, target?: Object): boolean;
          dispatchEvent(eventObj: string, target?: Object): boolean;
          dispatchEvent(eventObj: Event, target?: Object): boolean;
--- 68,73 ----

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions