Skip to content

Commit

Permalink
fix: typescript definitions for the event handlers are outdated and m…
Browse files Browse the repository at this point in the history
…issed the warnings.
  • Loading branch information
martinheidegger committed Apr 3, 2019
1 parent 6510007 commit 08cddfb
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,16 @@ export declare class NetworkInterfaces extends EventEmitter {
update (): PromiseLike<void>
checkUpdate (): PromiseLike<void>

addEventListener(event: 'data', handler: (change: AnyChange) => void)
on(event: 'data', handler: (change: AnyChange) => void)
once(event: 'data', handler: (change: AnyChange) => void)
prependListener(event: 'data', handler: (change: AnyChange) => void)
prependOnceListener(event: 'data', handler: (change: AnyChange) => void)
addEventListener(event: 'change', handler: (change?: AnyChange) => void)
on(event: 'change', handler: (change?: AnyChange) => void)
once(event: 'change', handler: (change?: AnyChange) => void)
prependListener(event: 'change', handler: (change?: AnyChange) => void)
prependOnceListener(event: 'change', handler: (change?: AnyChange) => void)
addEventListener(event: 'warning', handler: (err?) => void)
on(event: 'warning', handler: (err?) => void)
once(event: 'warning', handler: (err) => void)
prependListener(event: 'warning', handler: (err?) => void)
prependOnceListener(event: 'warning', handler: (err?) => void)

active (): NetworkInterface
stream (stringMode?: JSONStringMode): {
Expand Down

0 comments on commit 08cddfb

Please sign in to comment.