export type Supplier = T | Promise | (() => T | Promise); export const Supplier = { get: async (supplier: Supplier): Promise => { if (typeof supplier === "function") { return (supplier as () => T)(); } else { return supplier; } }, };