UNPKG

@platform/cell.typesystem

Version:

The 'strongly typed sheets' system of the CellOS.

45 lines (44 loc) 1.58 kB
import { t } from './common'; export declare type IArgs = { sheet: t.ITypedSheet; event$: t.Subject<t.TypedSheetEvent>; fetch: t.ISheetFetcher; cache?: t.IMemoryCache; }; export declare type TypedSheetStateInternal = t.ITypedSheetState & { getNs(): Promise<t.INsProps | undefined>; getCell(key: string): Promise<t.ICellData | undefined>; }; export declare class TypedSheetState implements t.ITypedSheetState { static create(args: IArgs): TypedSheetState; private constructor(); dispose(): void; private _changes; private readonly _dispose$; private readonly _event$; private readonly _sheet; readonly fetch: t.CachedFetcher; readonly dispose$: t.Observable<{}>; readonly event$: t.Observable<t.TypedSheetEvent>; readonly change$: t.Observable<t.ITypedSheetChange>; readonly changed$: t.Observable<t.ITypedSheetChanged>; get uri(): t.INsUri; get isDisposed(): boolean; get changes(): t.ITypedSheetStateChanges; get hasChanges(): boolean; getNs(): Promise<t.INsProps | undefined>; getCell(key: string): Promise<t.ICellData<t.ICellProps> | undefined>; clear: { cache: () => void; changes: (action: "REVERT" | "SAVE") => void; }; change: { ns: <D extends t.INsProps = t.INsProps>(to: D) => void; cell: <D_1 extends t.ICellData<t.ICellProps> = t.ICellData<t.ICellProps>>(key: string, to: D_1) => void; }; private fire; private fireNsChanged; private fireCellChanged; private fireChanged; private isWithinNamespace; }