Skip to content

Instantly share code, notes, and snippets.

@iam-peekay
Created December 3, 2016 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iam-peekay/bee8b5b1caeeb958560e4d6cdc6087b7 to your computer and use it in GitHub Desktop.
Save iam-peekay/bee8b5b1caeeb958560e4d6cdc6087b7 to your computer and use it in GitHub Desktop.
async function amountExceedsPurchaseLimit(
amount: number,
getPurchaseLimit: () => Promise<number>
): Promise<boolean> {
var limit = await getPurchaseLimit();
return limit > amount;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment