UNPKG

@winglet/json

Version:

TypeScript library for safe and efficient JSON data manipulation with RFC 6901 (JSON Pointer) and RFC 6902 (JSON Patch) compliance, featuring prototype pollution protection and immutable operations

12 lines (9 loc) 334 B
export type Dictionary<T = any> = Record<string, T>; export type StringDictionary = Dictionary<string>; export type DeepRequired<T> = { [P in keyof T]-?: NonNullable<T[P]> extends object ? NonNullable<T[P]> extends any[] ? DeepRequired<NonNullable<T[P]>[number]>[] : DeepRequired<NonNullable<T[P]>> : T[P]; };