-
-
Save bicatu/c51c682899e6b5329c484cf7c4a03b18 to your computer and use it in GitHub Desktop.
Temporal: Activity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { randomInt, randomUUID } from "crypto"; | |
// in practice all of these would be regular implementations of network/io-based services, databases, third-party | |
export async function captureFunds(amount: number): Promise<string> { | |
return Promise.resolve(randomUUID()); | |
} | |
export async function getBalance(customerId: string): Promise<number> { | |
return Promise.resolve(randomInt(1000)); | |
} | |
export const depositCoins = async (customerId: string, amount: number): Promise<boolean> => { | |
return Promise.resolve(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment