Skip to content

Commit

Permalink
Fix type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Jun 16, 2024
1 parent db87f50 commit 4873da5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@
"build": "rollup -c --environment target:all",
"build:es6": "rollup -c --environment target:es6",
"build:umd": "rollup -c --environment target:umd",
"build:types": "tsc --project ./tsconfig.json --declaration --emitDeclarationOnly --outDir types",
"build:types": "tsc --project ./tsconfig.json --declaration --emitDeclarationOnly",
"docs": "typedoc",
"lint": "eslint --ext .js src rollup.config.js",
"publint": "publint --level error",
"publish:observer": "npm run build && npm run build:types && npm publish",
"test": "mocha"
"test": "mocha",
"test:types": "tsc --pretty false types/index.d.ts"
}
}
6 changes: 3 additions & 3 deletions src/event-handle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class EventHandle {
/**
* Creates an instance of EventHandle.
*
* @param {Events} owner - Owner
* @param {import('./events.js').Events} owner - Owner
* @param {string} name - Name
* @param {HandleEvent} fn - Callback function
* @param {import('./events.js').HandleEvent} fn - Callback function
*/
constructor(owner, name, fn) {
this.owner = owner;
Expand Down Expand Up @@ -50,7 +50,7 @@ class EventHandle {
* chaining additional event listeners to the owner of this event handle.
*
* @param {string} name - Name
* @param {HandleEvent} fn - Callback function
* @param {import('./events.js').HandleEvent} fn - Callback function
* @returns {EventHandle} - EventHandle
*/
on(name, fn) {
Expand Down
12 changes: 7 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
* @module Observer
*/

import EventHandle from './event-handle.js';
import Events from './events.js';
import Observer from './observer.js';
import ObserverList from './observer-list.js';
import History from './history.js';
import Observer from './observer.js';
import ObserverHistory from './observer-history.js';
import ObserverList from './observer-list.js';

export {
EventHandle,
Events,
Observer,
ObserverList,
History,
ObserverHistory
Observer,
ObserverHistory,
ObserverList
};

0 comments on commit 4873da5

Please sign in to comment.