@mollie/api-client
Version:
Official Mollie API client for Node
8 lines (7 loc) • 374 B
TypeScript
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 {};