Browse Source

Make argument to public events callback optional

master
Joe Attardi 3 years ago
parent
commit
d9968bd52a
  1. 4
      src/index.ts

4
src/index.ts

@ -141,7 +141,7 @@ export class EmojiButton {
* @param event The name of the event to listen for
* @param callback The function to call when the event is fired
*/
on(event: string, callback: (arg: any) => void): void {
on(event: string, callback: (arg?: any) => void): void {
this.publicEvents.on(event, callback);
}
@ -151,7 +151,7 @@ export class EmojiButton {
* @param event The name of the event
* @param callback The callback to remove
*/
off(event: string, callback: (arg: any) => void): void {
off(event: string, callback: (arg?: any) => void): void {
this.publicEvents.off(event, callback);
}

Loading…
Cancel
Save