export type FilterKeys = Obj[keyof Obj & Matchers]; /** Returns any JSON mime type. Works with types like "application/problem+json". */ export type JSONLike = FilterKeys; /** Returns any TEXT mime type. */ export type TextLike = FilterKeys; /** Returns any special "no-content" entry. Special no-content entries are added by `ConvertContent`. */ export type NoContent = FilterKeys; /** * Converts a type to string while preserving string literal types. * {@link Array}s are unboxed to their stringified value. */ export type Stringify = Value extends (infer Type)[] ? Type extends string ? Type : string : Value extends string ? Value : string; /** Converts a object values to their {@link Stringify} value. */ export type ConvertToStringified = { [Name in keyof Params]: Stringify[Name]>; }; /** Returns a union of all property keys that are optional in the given object. */ export type OptionalKeys = { [K in keyof O]-?: {} extends Pick ? K : never; }[keyof O]; /** * Combines a union of objects into a single object. * This is useful for types like `keyof ({ a: string } | { b: string })`, * which is `never` without {@link ResolvedObjectUnion}. * * A use-case example of such situation is mapping different media-types that * split across multiple status codes. * * @see https://www.steveruiz.me/posts/smooshed-object-union */ export type ResolvedObjectUnion = { [K in T extends infer P ? keyof P : never]: T extends infer P ? K extends keyof P ? P[K] : never : never; }; /** Maps an object into a union of all its inner values. */ export type MapToValues = Obj[keyof Obj]; //# sourceMappingURL=type-utils.d.ts.map