@xylabs/forget
Version:
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
11 lines (9 loc) • 351 B
text/typescript
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface ForgetConfig<T = any> {
name?: string
onCancel?: () => void
onComplete?: (result: [T | undefined, Error | undefined]) => void
onException?: (error: Error) => void
timeout?: number
}
export const defaultForgetConfig: ForgetConfig<unknown> = { timeout: 30_000 }