Something went wrong. Try again.
Browser extension: detect and subscribe to standard.site publications on ATProto substandard.blog
Something went wrong. Try again.
123456789101112131415161718192021222324/** * Tokens for the current route or run. Beginning one cancels the wasm * operation still in flight and makes earlier tokens stale, so their * callbacks and results are ignored. */export interface Runs { begin(): number isActive(token: number): boolean}
export function createRuns(cancelActive: () => void): Runs { let active = 0 return { begin() { active += 1 cancelActive() return active }, isActive(token) { return token === active }, }}