View as Markdown

API reference: @salmonui/data/lookup

LookupOptionsinterface

import type { LookupOptions } from '@salmonui/data/lookup';

Also exported from @salmonui/data.

interface LookupOptions {
    load(request: LookupRequest): readonly unknown[] | Promise<readonly unknown[]>;
    readonly keyField?: string;
    readonly ttl?: number;
    readonly scheduler?: Scheduler;
}
LookupOptions members (4)
NameSignatureDescription
loadload(request: LookupRequest): readonly unknown[] | Promise<readonly unknown[]>;

Loads the rows of keys (only keys not cached). May return extra rows; they are cached too.

keyFieldoptionalreadonly keyField?: string;

Field of the returned rows holding the looked-up value. Default: the request's keyField. Dot paths allowed.

ttloptionalreadonly ttl?: number;

Entry lifetime in ms. Default: never expires.

scheduleroptionalreadonly scheduler?: Scheduler;