@hazae41/plume
Advanced tools
Comparing version 2.4.2 to 2.4.3
import * as index from './mods/index.js'; | ||
export { index as Plume }; | ||
export { AbortedError, CloseEvents, ClosedError, ErrorEvents, ErroredError } from './mods/errors.js'; | ||
export { CloseEvents, rejectOnClose } from './mods/closed.js'; | ||
export { ErrorEvents, rejectOnError } from './mods/errored.js'; | ||
export { SuperEventDescriptor, SuperEventListener, SuperEventMap, SuperEventTarget, SuperEventWaiter } from './mods/target.js'; | ||
export { waitOrCloseOrError, waitOrCloseOrErrorOrSignal, waitOrSignal } from './mods/waiters.js'; | ||
export { waitOrThrow, waitWithCloseAndErrorOrThrow } from './mods/waiters.js'; |
@@ -1,3 +0,4 @@ | ||
export { AbortedError, CloseEvents, ClosedError, ErrorEvents, ErroredError } from './errors.js'; | ||
export { CloseEvents, rejectOnClose } from './closed.js'; | ||
export { ErrorEvents, rejectOnError } from './errored.js'; | ||
export { SuperEventDescriptor, SuperEventListener, SuperEventMap, SuperEventTarget, SuperEventWaiter } from './target.js'; | ||
export { waitOrCloseOrError, waitOrCloseOrErrorOrSignal, waitOrSignal } from './waiters.js'; | ||
export { waitOrThrow, waitWithCloseAndErrorOrThrow } from './waiters.js'; |
import { Disposer } from '@hazae41/disposer'; | ||
import { Future } from '@hazae41/future'; | ||
import { Option } from '@hazae41/option'; | ||
import { Promiseable } from '../libs/promises/promiseable.js'; | ||
import { Awaitable } from '../libs/promises/index.js'; | ||
@@ -12,4 +12,4 @@ /** | ||
type SuperEventMap = Record<string, SuperEventDescriptor>; | ||
type SuperEventListener<T extends SuperEventDescriptor> = (...params: Parameters2<T>) => Promiseable<Option<ReturnType<T>>>; | ||
type SuperEventWaiter<T extends SuperEventDescriptor, R> = (future: Future<R>, ...params: Parameters2<T>) => Promiseable<Option<ReturnType<T>>>; | ||
type SuperEventListener<T extends SuperEventDescriptor> = (...params: Parameters2<T>) => Awaitable<Option<ReturnType<T>> | void>; | ||
type SuperEventWaiter<T extends SuperEventDescriptor, R> = (future: Future<R>, ...params: Parameters2<T>) => Awaitable<Option<ReturnType<T>> | void>; | ||
interface InternalSuperEventListenerOptions extends AddEventListenerOptions { | ||
@@ -16,0 +16,0 @@ off: () => void; |
@@ -1,8 +0,8 @@ | ||
import { CloseEvents, ErrorEvents } from './errors.js'; | ||
import { CloseEvents } from './closed.js'; | ||
import { ErrorEvents } from './errored.js'; | ||
import { SuperEventMap, SuperEventTarget, SuperEventWaiter } from './target.js'; | ||
declare function waitOrSignal<M extends SuperEventMap, K extends keyof M, R>(target: SuperEventTarget<M>, type: K, callback: SuperEventWaiter<M[K], R>, signal: AbortSignal): Promise<R>; | ||
declare function waitOrCloseOrError<M extends SuperEventMap & CloseEvents & ErrorEvents, K extends keyof M, R>(target: SuperEventTarget<M>, type: K, callback: SuperEventWaiter<M[K], R>): Promise<R>; | ||
declare function waitOrCloseOrErrorOrSignal<M extends SuperEventMap & CloseEvents & ErrorEvents, K extends keyof M, R>(target: SuperEventTarget<M>, type: K, callback: SuperEventWaiter<M[K], R>, signal: AbortSignal): Promise<R>; | ||
declare function waitOrThrow<M extends SuperEventMap, K extends keyof M, R>(target: SuperEventTarget<M>, type: K, callback: SuperEventWaiter<M[K], R>, signal?: AbortSignal): Promise<R>; | ||
declare function waitWithCloseAndErrorOrThrow<M extends SuperEventMap & CloseEvents & ErrorEvents, K extends keyof M, R>(target: SuperEventTarget<M>, type: K, callback: SuperEventWaiter<M[K], R>, signal?: AbortSignal): Promise<R>; | ||
export { waitOrCloseOrError, waitOrCloseOrErrorOrSignal, waitOrSignal }; | ||
export { waitOrThrow, waitWithCloseAndErrorOrThrow }; |
{ | ||
"type": "module", | ||
"name": "@hazae41/plume", | ||
"version": "2.4.2", | ||
"version": "2.4.3", | ||
"description": "Typed async events with sequenced and parallel dispatching", | ||
@@ -25,7 +25,7 @@ "homepage": "https://github.com/hazae41/plume", | ||
"dependencies": { | ||
"@hazae41/disposer": "^2.0.11", | ||
"@hazae41/disposer": "^2.0.20", | ||
"@hazae41/future": "^1.0.3", | ||
"@hazae41/option": "^1.0.27", | ||
"@hazae41/result": "^1.2.0", | ||
"@hazae41/signals": "^1.0.1" | ||
"@hazae41/option": "^1.1.3", | ||
"@hazae41/result": "^1.3.1", | ||
"@hazae41/signals": "^1.0.2" | ||
}, | ||
@@ -37,8 +37,8 @@ "devDependencies": { | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/node": "^20.11.30", | ||
"rollup": "^4.13.1", | ||
"rollup-plugin-dts": "^6.1.0", | ||
"rollup-plugin-node-externals": "^7.1.1", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.4.3" | ||
"@types/node": "^22.5.1", | ||
"rollup": "^4.21.2", | ||
"rollup-plugin-dts": "^6.1.1", | ||
"rollup-plugin-node-externals": "^7.1.3", | ||
"tslib": "^2.7.0", | ||
"typescript": "^5.5.4" | ||
}, | ||
@@ -45,0 +45,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37
101843
578
Updated@hazae41/disposer@^2.0.20
Updated@hazae41/option@^1.1.3
Updated@hazae41/result@^1.3.1
Updated@hazae41/signals@^1.0.2