UNPKG

@promptbook/remote-client

Version:

Promptbook: Turn your company's scattered knowledge into AI ready books

16 lines (15 loc) 684 B
import type { ReadonlyDeep } from 'type-fest'; import type { $side_effect } from '../organization/$side_effect'; /** * Freezes the given object and all its nested objects recursively * * Note: `$` is used to indicate that this function is not a pure function - it mutates given object * Note: This function mutates the object and returns the original (but mutated-deep-freezed) object * * @returns The same object as the input, but deeply frozen * @public exported from `@promptbook/utils` */ export declare function $deepFreeze<TObject>(objectValue: TObject): ReadonlyDeep<$side_effect & TObject>; /** * TODO: [🧠] Is there a way how to meaningfully test this utility */