UNPKG

@mollie/api-client

Version:
8 lines (7 loc) 374 B
type Nullish = null | undefined; /** * Returns a promise which resolves to the passed value; unless the passed value is * [nullish](https://developer.mozilla.org/docs/Glossary/Nullish), in which case it returns that value directly. */ export default function resolveIf<T>(value: T extends Promise<unknown> ? never : T): Promise<unknown> | Extract<T, Nullish>; export {};