type Awaitable = Promise | T; /** Simplify ({...} & {...}) types into a unified object */ type Simplify = { [KeyType in keyof T]: T[KeyType]; } & {}; /** * Merge two objects, at a depth of 1, where keys of B take precedence over A */ type MergeObjectsShallow = Simplify<{ [K in keyof A]: K extends keyof B ? B[K] : A[K]; } & B>; type UnknownValues = { [Key in keyof T]: unknown; }; type AnyCtx = Record; type AnyMeta = Record; type Strip = { [Key in keyof T as [T[Key]] extends [U] ? never : Key]: T[Key]; } & {}; export type { AnyCtx as A, MergeObjectsShallow as M, Strip as S, UnknownValues as U, AnyMeta as a, Awaitable as b };