import { SDataArray } from 's-array'; import { DataSignal } from 's-js'; export interface Jsonable { toJSON(): any; } /** * Makes an s.js signal jsonable by adding a `toJSON` method that extracts its value during JSONization. * * Adapted from GitHub project * [adamhaile/surplus-todomvc](https://github.com/adamhaile/surplus-todomvc/blob/37ffcdfca66a11365ff88aeed5db9f38b97ba2c6/src/models.ts). */ export declare function jsonable any>(s: T): T & Jsonable; /** * Creates a new plain JSON value for the given value (which may contain signals or `Set` instances). */ export declare function toPlain(source: T): Plain; declare type PlainHelper = T extends SDataArray ? U1[] : T extends DataSignal ? U2 : T extends Set ? U3[] : T extends ({ [P in keyof T]: T[P]; } & { transient: any; }) ? { [P in Exclude]: PlainHelper; } : T extends { [P in keyof T]: T[P]; } ? { [P in keyof T]: PlainHelper; } : T; export declare type Plain = PlainHelper>>; export {}; //# sourceMappingURL=s.d.ts.map