export type Promisable = T | Promise; /** * Compile-time-only marker used by `$type()` to carry an unchecked response * type through route declarations. * * @remarks Consumers usually use `$type()` instead of constructing this type * directly. */ export type Unchecked = Record & { __unchecked__: T; }; /** * Compile-time-only marker used by `$error()` to carry a declared error * response type through route declarations. * * @remarks Consumers usually use `$error()` instead of constructing this * type directly. */ export type UncheckedError = { __uncheckedError__: T; }; /** * Map over all the keys to create a new object. * * @see https://radashi.js.org/reference/object/mapEntries * @example * ```ts * const a = { a: 1, b: 2, c: 3 } * mapEntries(a, (key, value) => [value, key]) * // => { 1: 'a', 2: 'b', 3: 'c' } * ``` * @version 12.1.0 */ export declare function mapEntries(obj: Record, toEntry: (key: TKey, value: TValue) => [TNewKey, TNewValue]): Record; /** * Removes (shakes out) undefined entries from an object. Optional * second argument shakes out values by custom evaluation. * * Note that non-enumerable keys are never shaken out. * * @see https://radashi.js.org/reference/object/shake * @example * ```ts * const a = { a: 1, b: undefined, c: 3 } * shake(a) * // => { a: 1, c: 3 } * ``` * @version 12.1.0 */ export declare function shake(obj: T): { [K in keyof T]: Exclude; }; export declare function shake(obj: T, filter: ((value: unknown) => boolean) | undefined): T; /** * Map over all the keys to create a new object. * * @see https://radashi.js.org/reference/object/mapValues * @example * ```ts * const a = { a: 1, b: 2, c: 3 } * mapValues(a, (value, key) => value * 2) * // => { a: 2, b: 4, c: 6 } * ``` * @version 12.1.0 */ export declare function mapValues(obj: T, mapFunc: (value: Required[keyof T], key: keyof T) => U): { [K in keyof T]: U; };