1234567891011121314151617181920212223242526 |
- import type { Container, Slice, SliceType } from '../context';
- import type { Clock, TimerType } from '../timer';
- import { Inspector } from '../inspector';
- import type { Meta } from '../inspector';
- export declare class Ctx {
- #private;
- constructor(container: Container, clock: Clock, meta?: Meta);
- get meta(): Meta | undefined;
- get inspector(): Inspector | undefined;
- readonly produce: (meta?: Meta) => Ctx;
- readonly inject: <T>(sliceType: SliceType<T, string>, value?: T | undefined) => this;
- readonly remove: <T, N extends string = string>(sliceType: N | SliceType<T, N>) => this;
- readonly record: (timerType: TimerType) => this;
- readonly clearTimer: (timerType: TimerType) => this;
- readonly isInjected: <T, N extends string = string>(sliceType: N | SliceType<T, N>) => boolean;
- readonly isRecorded: (timerType: TimerType) => boolean;
- readonly use: <T, N extends string = string>(sliceType: N | SliceType<T, N>) => Slice<T, N>;
- readonly get: <T, N extends string>(sliceType: N | SliceType<T, N>) => T;
- readonly set: <T, N extends string>(sliceType: N | SliceType<T, N>, value: T) => void;
- readonly update: <T, N extends string>(sliceType: N | SliceType<T, N>, updater: (prev: T) => T) => void;
- readonly timer: (timer: TimerType) => import("../timer").Timer;
- readonly done: (timer: TimerType) => void;
- readonly wait: (timer: TimerType) => Promise<void>;
- readonly waitTimers: (slice: SliceType<TimerType[]>) => Promise<void>;
- }
- //# sourceMappingURL=ctx.d.ts.map
|