diff --git a/package.json b/package.json index 4663087..c1999a3 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,17 @@ { "name": "@avidian/events", - "version": "1.0.0", + "version": "1.0.1", "description": "A pub/sub library for handling events.", "main": "lib/index.js", - "repository": "https://github.com/avidianity/events", + "repository": { + "type": "git", + "url": "https://github.com/avidianity/events.git" + }, "author": "John Michael Manlupig", "types": "types/index.d.ts", + "publishConfig": { + "access": "public" + }, "scripts": { "type-check": "tsc --noEmit", "type-check:watch": "npm run type-check -- --watch", diff --git a/src/index.ts b/src/index.ts index 22c1d22..fa4ce16 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,2 @@ export { Manager } from './Manager'; +export { Manager as default } from './Manager'; diff --git a/types/Manager.d.ts b/types/Manager.d.ts index e72c1a7..2b7cc33 100644 --- a/types/Manager.d.ts +++ b/types/Manager.d.ts @@ -8,6 +8,7 @@ export declare class Manager { getObservers(): Observers; on(key: string, callback: (value: T) => void): Key; off(key: Key): void; + clear(): this; listen(key: string, callback: (value: T) => void): Key; unlisten(key: Key): void; dispatch(name: string, value?: any): this; diff --git a/types/index.d.ts b/types/index.d.ts index 5f12ea8..b37ae61 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1 +1,2 @@ export { Manager } from './Manager'; +export { Manager as default } from './Manager';