import type { Operator } from "../Operator"; import type { StatefulEvt } from "./StatefulEvt"; import type { CtxLike } from "./CtxLike"; import type { Evt } from "./Evt"; import type { Handler } from "../Handler"; import type { AsyncIterableEvt } from "../AsyncIterableEvt"; export interface NonPostableEvt { /** https://docs.evt.land/api/statefulevt#converting-an-evt-into-a-statefulevt */ toStateful(initialState: T, ctx?: CtxLike): StatefulEvt; toStateful(ctx?: CtxLike): StatefulEvt; /** https://docs.evt.land/api/evt/evtattachdetach */ readonly evtAttach: Evt>; /** https://docs.evt.land/api/evt/evtattachdetach */ readonly evtDetach: Evt>; /** https://docs.evt.land/api/evt/setmaxhandlers */ setMaxHandlers(n: number): this; /** * https://docs.evt.land/api/evt/post * * Number of times .post(data) have been called. */ readonly postCount: number; /** https://docs.evt.land/api/evt/enabletrace */ enableTrace( params: { id: string, formatter?: (data: T) => string, log?: ((message?: any, ...optionalParams: any[]) => void) | false } //NOTE: Not typeof console.log as we don't want to expose types from node ): void; /** https://docs.evt.land/api/evt/enabletrace */ disableTrace(): this; /** * TODO: Update doc, it replace: https://docs.evt.land/api/evt/getstatelessop * Maybe this feature is too confusing to be documented... * */ getInvocableOp(op: Operator): Operator.fλ.Stateless; /** TODO: DOC !!! */ isHandledByOp(op: Operator, data: T): boolean; /** * https://docs.evt.land/api/evt/ishandled * * Test if posting a given event data will have an effect. * * Return true if: * -There is at least one handler matching * this event data ( at least one handler's callback function * will be invoked if the data is posted. ) * -Handlers could be will be detached * if the event data is posted. * */ isHandled(data: T): boolean; /** https://docs.evt.land/api/evt/gethandler */ getHandlers(): Handler[]; /** * https://docs.evt.land/api/evt/detach * * Detach every handlers of the Evt that are bound to the provided context * */ detach(ctx: CtxLike): Handler>[]; /** * https://docs.evt.land/api/evt/detach * * (unsafe) Detach every handlers from the Evt * */ detach(): Handler[]; /** https://docs.evt.land/api/evt/pipe */ pipe(): Evt; pipe( op: Operator.fλ ): Evt; pipe( op: (data: T) => data is U ): Evt; pipe( op: (data: T) => boolean ): Evt; pipe(ctx: CtxLike): Evt; pipe( ctx: CtxLike, op: Operator.fλ ): Evt; pipe( ctx: CtxLike, op: (data: T) => data is U ): Evt; pipe( ctx: CtxLike, op: (data: T) => boolean ): Evt; pipe( op1: Operator.fλ, op2: Operator.fλ ): Evt; pipe( op1: Operator.fλ, op2: (data: B) => data is C ): Evt; pipe( op1: Operator.fλ, op2: (data: B) => boolean ): Evt; pipe( op1: (data: T) => data is B, op2: Operator.fλ ): Evt; pipe( op1: (data: T) => boolean, op2: Operator.fλ ): Evt; pipe( op1: (data: T) => data is B, op2: (data: B) => data is C ): Evt; pipe( op1: (data: T) => data is B, op2: (data: B) => boolean ): Evt; pipe( op1: (data: T) => boolean, op2: (data: T) => data is B ): Evt; pipe( op1: (data: T) => boolean, op2: (data: T) => boolean ): Evt; pipe( op1: Operator.fλ, op2: Operator.fλ, op3: Operator.fλ ): Evt; pipe( op1: Operator.fλ, op2: Operator.fλ, op3: Operator.fλ, op4: Operator.fλ ): Evt; pipe( op1: Operator.fλ, op2: Operator.fλ, op3: Operator.fλ, op4: Operator.fλ ): Evt; pipe( op1: Operator.fλ, op2: Operator.fλ, op3: Operator.fλ, op4: Operator.fλ, op5: Operator.fλ ): Evt; pipe( op1: Operator, op2: Operator ): Evt; pipe( op1: Operator, op2: Operator, op3: Operator ): Evt; pipe( op1: Operator, op2: Operator, op3: Operator, op4: Operator ): Evt; pipe( op1: Operator, op2: Operator, op3: Operator, op4: Operator, op5: Operator ): Evt; pipe( ...ops: [ Operator, ...Operator[] ] ): Evt; pipe( ...ops: [ Operator, ...Operator[] ] ): Evt; /** * https://docs.evt.land/api/evt/waitfor * * op - fλ * * ctx * * timeout? */ waitFor( op: Operator.fλ.Stateless, ctx: CtxLike, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * op - Type guard * * ctx * * timeout? */ waitFor( op: (data: T) => data is Q, ctx: CtxLike, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * op - Filter * * ctx * * timeout? */ waitFor( op: (data: T) => boolean, ctx: CtxLike, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * op - fλ * * timeout? */ waitFor( op: Operator.fλ.Stateless, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * op - Type guard * * timeout? */ waitFor( op: (data: T) => data is Q, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * op - Filter * * timeout? */ waitFor( op: (data: T) => boolean, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * ctx * * timeout? */ waitFor( ctx: CtxLike, timeout?: number ): Promise; /** * https://docs.evt.land/api/evt/waitfor * * timeout? */ waitFor( timeout?: number ): Promise; [Symbol.asyncIterator](): AsyncIterator; /** * https://docs.evt.land/api/evt/iter * * op - fλ * * ctx * * timeout? */ iter( op: Operator.fλ.Stateless, ctx: CtxLike, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * op - Type guard * * ctx * * timeout? */ iter( op: (data: T) => data is Q, ctx: CtxLike, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * op - Filter * * ctx * * timeout? */ iter( op: (data: T) => boolean, ctx: CtxLike, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * op - fλ * * timeout? */ iter( op: Operator.fλ.Stateless, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * op - Type guard * * timeout? */ iter( op: (data: T) => data is Q, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * op - Filter * * timeout? */ iter( op: (data: T) => boolean, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * ctx * * timeout? */ iter( ctx: CtxLike, timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/iter * * timeout? */ iter( timeout?: number ): AsyncIterableEvt; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attach( op: Operator.fλ, ctx: CtxLike, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attach( op: Operator.fλ, ctx: CtxLike, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attach( op: Operator.fλ, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attach( op: Operator.fλ, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) * */ attach( op: (data: T) => data is Q, ctx: CtxLike, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => boolean, ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => data is Q, ctx: CtxLike, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => boolean, ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => data is Q, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => boolean, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * ctx * * timeout * * callback */ attach( ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => data is Q, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attach() method ) */ attach( op: (data: T) => boolean, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * ctx * * callback */ attach( ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * timeout * * callback */ attach( timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * callback */ attach( callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * timeout * * callback * * NOTE: $attachOnce() with '$' is to use only with fλ operators, * if your operator return a boolean use the attachOnce() without the '$' prefix. */ $attachOnce( op: Operator.fλ.Stateless, ctx: CtxLike, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * callback * * NOTE: $attachOnce() with '$' is to use only with fλ operators, * if your operator return a boolean use the attachOnce() without the '$' prefix. */ $attachOnce( op: Operator.fλ.Stateless, ctx: CtxLike, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * timeout * * callback * * NOTE: $attachOnce() with '$' is to use only with fλ operators, * if your operator return a boolean use the attachOnce() without the '$' prefix. */ $attachOnce( op: Operator.fλ.Stateless, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * callback * * NOTE: $attachOnce() with '$' is to use only with fλ operators, * if your operator return a boolean use the attachOnce() without the '$' prefix. */ $attachOnce( op: Operator.fλ.Stateless, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => data is Q, ctx: CtxLike, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => boolean, ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => data is Q, ctx: CtxLike, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => boolean, ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => data is Q, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * timeout * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => boolean, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * ctx * * timeout * * callback */ attachOnce( ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => data is Q, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * callback * * NOTE: If you whish to use a fλ operator ( an operator that do not return a boolean ) * the '$' prefix should be used ( use the $attachOnce() method ) */ attachOnce( op: (data: T) => boolean, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * ctx * * callback */ attachOnce( ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * timeout * * callback */ attachOnce( timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * callback */ attachOnce( callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachExtract( op: Operator.fλ, ctx: CtxLike, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachExtract( op: Operator.fλ, ctx: CtxLike, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachExtract( op: Operator.fλ, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachExtract( op: Operator.fλ, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * timeout * * callback */ attachExtract( op: (data: T) => data is Q, ctx: CtxLike, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * timeout * * callback */ attachExtract( op: (data: T) => boolean, ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * callback */ attachExtract( op: (data: T) => data is Q, ctx: CtxLike, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * callback */ attachExtract( op: (data: T) => boolean, ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * timeout * * callback */ attachExtract( op: (data: T) => data is Q, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * timeout * * callback */ attachExtract( op: (data: T) => boolean, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * ctx * * timeout */ attachExtract( ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * callback */ attachExtract( op: (data: T) => data is Q, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * callback */ attachExtract( op: (data: T) => boolean, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * ctx * * callback */ attachExtract( ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * timeout * * callback */ attachExtract( timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * callback */ attachExtract( callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachPrepend( op: Operator.fλ, ctx: CtxLike, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachPrepend( op: Operator.fλ, ctx: CtxLike, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachPrepend( op: Operator.fλ, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachPrepend( op: Operator.fλ, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * timeout * * callback */ attachPrepend( op: (data: T) => data is Q, ctx: CtxLike, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * timeout * * callback */ attachPrepend( op: (data: T) => boolean, ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * callback */ attachPrepend( op: (data: T) => data is Q, ctx: CtxLike, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * callback */ attachPrepend( op: (data: T) => boolean, ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * timeout * * callback */ attachPrepend( op: (data: T) => data is Q, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * timeout * * callback */ attachPrepend( op: (data: T) => boolean, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * ctx * * timeout * * callback */ attachPrepend( ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * callback */ attachPrepend( op: (data: T) => data is Q, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * callback */ attachPrepend( op: (data: T) => boolean, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * ctx * * callback */ attachPrepend( ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * timeout * * callback */ attachPrepend( timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * callback */ attachPrepend( callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOncePrepend( op: Operator.fλ.Stateless, ctx: CtxLike, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOncePrepend( op: Operator.fλ.Stateless, ctx: CtxLike, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOncePrepend( op: Operator.fλ.Stateless, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOncePrepend( op: Operator.fλ.Stateless, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * timeout * * callback */ attachOncePrepend( op: (data: T) => data is Q, ctx: CtxLike, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * timeout * * callback */ attachOncePrepend( op: (data: T) => boolean, ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * callback */ attachOncePrepend( op: (data: T) => data is Q, ctx: CtxLike, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * callback */ attachOncePrepend( op: (data: T) => boolean, ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * timeout * * callback */ attachOncePrepend( op: (data: T) => data is Q, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * timeout * * callback */ attachOncePrepend( op: (data: T) => boolean, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * ctx * * timeout * * callback */ attachOncePrepend( ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * callback */ attachOncePrepend( op: (data: T) => data is Q, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * callback */ attachOncePrepend( op: (data: T) => boolean, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * ctx * * callback */ attachOncePrepend( ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * timeout * * callback */ attachOncePrepend( timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * callback */ attachOncePrepend( callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOnceExtract( op: Operator.fλ.Stateless, ctx: CtxLike, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * ctx * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOnceExtract( op: Operator.fλ.Stateless, ctx: CtxLike, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * timeout * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOnceExtract( op: Operator.fλ.Stateless, timeout: number, callback: (transformedData: U) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - fλ * * callback * * NOTE: $attach() with '$' is to use only with fλ operators, * if your operator return a boolean use the attach() without the '$' prefix. */ $attachOnceExtract( op: Operator.fλ.Stateless, callback: (transformedData: U) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * timeout * * callback */ attachOnceExtract( op: (data: T) => data is Q, ctx: CtxLike, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * timeout * * callback */ attachOnceExtract( op: (data: T) => boolean, ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * ctx * * callback */ attachOnceExtract( op: (data: T) => data is Q, ctx: CtxLike, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * ctx * * callback */ attachOnceExtract( op: (data: T) => boolean, ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * timeout * * callback */ attachOnceExtract( op: (data: T) => data is Q, timeout: number, callback: (data: Q) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * timeout * * callback */ attachOnceExtract( op: (data: T) => boolean, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * ctx * * timeout */ attachOnceExtract( ctx: CtxLike, timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * op - Type guard * * callback */ attachOnceExtract( op: (data: T) => data is Q, callback: (data: Q) => void ): this; /** * https://docs.evt.land/api/evt/attach * * op - Filter * * callback */ attachOnceExtract( op: (data: T) => boolean, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * ctx * * callback */ attachOnceExtract( ctx: CtxLike, callback: (data: T) => void ): this; /** * https://docs.evt.land/api/evt/attach * * timeout * * callback */ attachOnceExtract( timeout: number, callback: (data: T) => void ): Promise; /** * https://docs.evt.land/api/evt/attach * * callback */ attachOnceExtract( callback: (data: T) => void ): this; }