import { type EncodedValue, type NodeID, ValueType } from '@solid-devtools/debugger/types'; export declare class StoreNodeMap { map: Map<`#${string}`, { node: DecodedValue; refs: number; }>; get(id: NodeID): DecodedValue | null; addRef(id: NodeID, node: DecodedValue): void; removeRef(id: NodeID): void; clear(): void; } export type ObjectValueData = { readonly value: Record | DecodedValue[] | null; readonly length: number; readonly setValue: (newValue: number | Readonly> | DecodedValue[]) => void; }; type DecodedDataMap = { [ValueType.String]: { readonly value: string; }; [ValueType.Number]: { readonly value: number; }; [ValueType.Boolean]: { readonly value: boolean; }; [ValueType.Null]: { readonly value: null | undefined; }; [ValueType.Symbol]: { readonly name: string; }; [ValueType.Instance]: { readonly name: string; }; [ValueType.Function]: { readonly name: string; }; [ValueType.Element]: { readonly name: string; readonly id: NodeID; }; [ValueType.Getter]: { readonly name: string; }; [ValueType.Array]: ObjectValueData; [ValueType.Object]: ObjectValueData; [ValueType.Store]: ObjectValueData & { readonly id: NodeID; readonly valueType: ValueType.Array | ValueType.Object; }; [ValueType.Unknown]: {}; }; type DecodedValueMap = { [K in ValueType]: DecodedDataMap[K] & { readonly type: K; }; }; export type DecodedValue = DecodedValueMap[T]; /** * Check if a value is an object type (array, object, or store). */ export declare const isObjectType: (value: DecodedValue) => value is DecodedValue; /** * Check if a value is an object type (array, object, or store). * And that it has children. (isn't empty) */ export declare const isValueNested: (value: DecodedValue) => value is DecodedValue; /** * Decode a list of encoded values into a tree of decoded values. * The previous value is important for removing store references that are no longer in the tree. */ export declare function decodeValue(list: EncodedValue[], prevValue: DecodedValue | null, storeRefMap: StoreNodeMap): DecodedValue; /** * Collapse or extend the value of an object/array/store. * The previous value is important for removing store references that are no longer in the tree. */ export declare function updateCollapsedValue(data: DecodedValue, list: EncodedValue[], storeRefMap: StoreNodeMap): void; export {}; //# sourceMappingURL=decode.d.ts.map