aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
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