File size: 1,085 Bytes
9ada4bc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import type { InquirerReadline } from './read-line.type.mjs';
type HookStore = {
rl: InquirerReadline;
hooks: any[];
hooksCleanup: Array<void | (() => void)>;
hooksEffect: Array<() => void>;
index: number;
handleChange: () => void;
};
export declare function withHooks(rl: InquirerReadline, cb: (store: HookStore) => void): void;
export declare function readline(): InquirerReadline;
export declare function withUpdates<T extends (...args: any) => any>(fn: T): (...args: Parameters<T>) => ReturnType<T>;
type SetPointer<Value> = {
get(): Value;
set(value: Value): void;
initialized: true;
};
type UnsetPointer<Value> = {
get(): void;
set(value: Value): void;
initialized: false;
};
type Pointer<Value> = SetPointer<Value> | UnsetPointer<Value>;
export declare function withPointer<Value, ReturnValue>(cb: (pointer: Pointer<Value>) => ReturnValue): ReturnValue;
export declare function handleChange(): void;
export declare const effectScheduler: {
queue(cb: (readline: InquirerReadline) => void): void;
run(): void;
};
export {};
|