aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorDavid Khourshid <[email protected]>2018-09-19 08:36:23 -0400
committerJason Miller <[email protected]>2018-09-19 08:36:23 -0400
commit0f4e8f0d3c0cfe4581edd9e93d3dac0ce994eefb (patch)
treee4e8582b41b0cd78edd07af5255a3ada809b1386 /README.md
parent820ac6a172efbbd472e0a802ffad6a882f0cbb27 (diff)
Fixing TypeScript usage. Fixes #60 (#67)
* Fixing TypeScript usage * Removing extraneous formatting
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 3625332..daa2924 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,7 @@ You can find the library on `window.mitt`.
```js
import mitt from 'mitt'
-let emitter = mitt()
+const emitter = mitt()
// listen to an event
emitter.on('foo', e => console.log('foo', e) )
@@ -77,8 +77,8 @@ emitter.off('foo', onFoo) // unlisten
### Typescript
```ts
-import * as mitt from 'mitt';
-let emitter: mitt.Emitter = new mitt();
+import mitt from 'mitt';
+const emitter: mitt.Emitter = mitt();
```
## Examples & Demos