Skip to content
Myr

Typescript definitions (#25)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Added type definitions * Handler only has exactly one or no argument * Moved type defs to root folder

authored by Severin · committed by Jason Miller · parent e428f3a · Browse files · 4 files+62 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+62 added−1 removed

  • other:+62 added−1 removed

4 files+62 added−1 removed

added:mitt.d.ts+46 added
modified:package.json+3 added-1 removed
modified:README.md+8 added
69 unmodified lines
70emitter.on('foo', onFoo) // listen71emitter.off('foo', onFoo) // unlisten72```7374### Typescript75```ts76import * as mitt from 'mitt';77let emitter: mitt.Emitter = new mitt();78```7980## Examples & Demos8182<a href="http://codepen.io/developit/pen/rjMEwW?editors=0110">83 <b>Preact + Mitt Codepen Demo</b>84 <br>85 <img src="https://i.imgur.com/CjBgOfJ.png" width="278" alt="preact + mitt preview">86</a>8788* * *8990## API9192### mitt93
63 unmodified lines
added:typings.json+5 added