/** Removes all undefined and nulls from the nested types making all nested fields * non-nullable hence you can simply chain through it and autosuggestion will work * and will not complain on undefiness and nullability of some of the nested fields * including the root * * @example * type AllOpt = { * a?: string * arr?: string[] | null * b?: { * c?: string | undefined | null * n?: * | { * a?: string | null * b: object | null * } * | null * | undefined * } * c?: string * } * * type AllReq = RequireRecursively * * const obj: AllReq = ({} as unknown) as AllReq * * obj.b.c // -> string * obj.b.n.a // -> string * obj.b.n.b // -> object * obj.arr // -> string[] * * */ export type RequiredRecursively = Exclude[] : T[P] extends Array ? RequiredRecursively[] : RequiredRecursively; }, null | undefined>; export type AccessorFunction = (object: RequiredRecursively) => R; export declare function get(object: T, accessorFn: AccessorFunction): R | undefined; export declare function get(object: T, accessorFn: AccessorFunction, defaultValue: R): R; export declare function getString(object: T, accessorFn: AccessorFunction): string | undefined; export declare function getString(object: T, accessorFn: AccessorFunction, defaultValue: string): string;