UNPKG

@platform/cell.typesystem

Version:

The 'strongly typed sheets' system of the CellOS.

45 lines (44 loc) 1.45 kB
import { coord, t } from '../common'; declare type M = 'getNs' | 'getColumns' | 'getCells'; export declare type IStubFetcher = t.ISheetFetcher & { count: { getNs: number; getColumns: number; getCells: number; }; }; declare const instance: <T>(args: { instance: string; implements: string; defs: { [ns: string]: t.ITypeDefPayload; }; rows?: T[] | undefined; cells?: coord.cell.ICellMap<coord.cell.ICellData<coord.cell.ICellProps>> | undefined; cache?: t.IMemoryCache<string> | undefined; getTypeDef?: ((defs: t.INsTypeDef[]) => t.INsTypeDef) | undefined; }) => Promise<IStubFetcher>; export declare const stub: { fetch: (data: { defs: { [ns: string]: t.ITypeDefPayload; }; cells?: coord.cell.ICellMap<coord.cell.ICellData<coord.cell.ICellProps>> | undefined; before?: ((args: { method: M; args: any; }) => void) | undefined; }) => IStubFetcher; instance: <T>(args: { instance: string; implements: string; defs: { [ns: string]: t.ITypeDefPayload; }; rows?: T[] | undefined; cells?: coord.cell.ICellMap<coord.cell.ICellData<coord.cell.ICellProps>> | undefined; cache?: t.IMemoryCache<string> | undefined; getTypeDef?: ((defs: t.INsTypeDef[]) => t.INsTypeDef) | undefined; }) => Promise<IStubFetcher>; }; export {};