UNPKG

openblox

Version:

Roblox API Wrapper For Both Classic And OpenCloud APIs.

20 lines (19 loc) 734 B
import { ObjectPrettifyDeep } from "typeforge"; type AllApis = any; export type CacheConfig<Settings extends Record<string, any>> = Settings | ObjectPrettifyDeep<({ "*"?: Settings; } & { [ApiName in keyof AllApis]?: ((Settings & { [MethodName in keyof AllApis[ApiName]]?: undefined; }) | { [MethodName in keyof AllApis[ApiName]]?: Settings; }); })>; export type CacheAdapter<Settings extends Record<string, any>, CustomConfig extends Record<string, any>> = (<Config extends ObjectPrettifyDeep<CustomConfig & { included: CacheConfig<Settings>; }>>(config: Config) => ({ name: string; get: (key: string) => any; set: (settings: Settings, key: string, value: any) => void; })); export {};