import type Keyv from 'keyv'; import type KeyvFile from './index'; export declare class Field { protected kv: KeyvFile | Keyv | Map; protected key: string; protected defaults: D; constructor(kv: KeyvFile | Keyv | Map, key: string, defaults: D); get(): Promise; get(def: D): Promise; getSync(): D; getSync(def: D): D; /** * Note: `await kv.someFiled.set()` will wait millseconds to save to disk, it would be slow. Please remove `await` if you find performance issues. * @param value * @param ttl * @returns */ set(val: T, ttl?: number): Promise | Map; delete(): boolean | Promise; } export declare function makeField(kv: KeyvFile | Keyv | Map, key: string, defaults: T): Field;