anilist-api-wrapper/src/types/AtLeastOne.ts

6 lines
128 B
TypeScript

export type AtLeastOne<O> = {
[P in keyof O]:
& { [L in P]: O[L] }
& { [L in Exclude<keyof O, P>]?: O[L] }
}[keyof O]