/** @module Types/Misc */ /** * Can be a promise or not */ export type Promisable = T | Promise; // Source: (i cba making a recursive omit for the 7th time) // https://stackoverflow.com/a/54487392 type OmitDistributive = T extends any ? (T extends object ? Id> : T) : never; type Id = {} & { [P in keyof T] : T[P]} // Cosmetic use only makes the tooltips expad the type can be removed export type OmitRecursively = Omit< { [P in keyof T]: OmitDistributive }, K > type Optional = Pick, K> & Omit; /** * Removes the additional parameters associated * with bufbuild's message. */ export type CleanProtoMessage = OmitRecursively;