Files
xget/src/types.d.ts
T
xixu-me 4993444f51 Add type declarations and improve test typings
Introduces src/types.d.ts and test/types.d.ts for Cloudflare Workers and test utilities. Enhances JSDoc comments and type annotations across test files for better type safety and clarity. Updates tsconfig.json to use bundler module resolution and include additional type sources. Minor test logic and assertion improvements for robustness.
2025-12-08 19:57:48 +08:00

21 lines
458 B
TypeScript

/**
* Global type declarations for Cloudflare Workers
*/
/**
* Cloudflare Workers execution context
* Provides methods for managing background tasks
*/
interface ExecutionContext {
/**
* Extend the lifetime of the request handler
* @param promise - Promise to wait for in the background
*/
waitUntil(promise: Promise<any>): void;
/**
* Prevent request from failing if an exception is thrown
*/
passThroughOnException(): void;
}