UNPKG

@diffusionstudio/core-v4

Version:

2D motion graphics and video rendering engine

38 lines (37 loc) 1.59 kB
import { Serializer } from '../services'; import { Store } from '.'; type Events = { update: any; }; declare const StorageItem_base: { new (...args: any[]): { _handlers: { '*'?: { [x: string]: (event: import('../mixins/event/types').EmittedEvent<any, any>) => void; } | undefined; error?: { [x: string]: (event: import('../mixins/event/types').EmittedEvent<Error, any>) => void; } | undefined; update?: { [x: string]: (event: import('../mixins/event/types').EmittedEvent<any, any>) => void; } | undefined; }; on<T_1 extends "*" | "error" | "update">(eventType: T_1, callback: (event: import('../mixins/event/types').EmittedEvent<import('../mixins/event/types').BaseEvents<Events>[T_1], /*elided*/ any>) => void): string; off(id?: string | "*", ...ids: string[]): void; emit<T_1 extends "*" | "error" | "update">(eventType: T_1, detail: import('../mixins/event/types').BaseEvents<Events>[T_1]): void; bubble(target: /*elided*/ any): string; resolve(eventType: "*" | "error" | "update"): (resolve: (value: unknown) => void, reject: (reason?: any) => void) => void; }; } & typeof Serializer; export declare class StorageItem<T> extends StorageItem_base { private _key; private _value; private _store; loaded: boolean; constructor(store: Store, key: string, value: T | Promise<T>); get key(): string; get value(): T; set value(newValue: T); private initValue; } export {};