import type { CfProperties, ExecutionContext } from '@cloudflare/workers-types'; interface EventBase { protocol: string; host: string; method: string; headers: Record; } interface MinimalCloudflareProps { context: ExecutionContext; request?: Record; env?: Record; } interface CloudflareContext { cf: CfProperties; cloudflare: MinimalCloudflareProps; } interface CfEventDirect extends EventBase { context: CloudflareContext; } interface CfEventPlatform extends EventBase { context: { _platform: CloudflareContext; }; } export type CfEventType = CfEventDirect | CfEventPlatform; /** * Type guard to check if an event context object has cf properties */ export declare function hasCfProperty(context: unknown): context is { cf: CfProperties; }; /** * Type guard to check if an event is a Cloudflare event (nested in _platform or direct) */ export declare function isEventType(event: unknown): event is CfEventType; /** * Extracts cf properties from a Cloudflare event */ export declare function getCfProperties(event: CfEventType): CfProperties; /** * Extracts cloudflare properties from a Cloudflare event */ export declare function getCloudflareProperties(event: CfEventType): MinimalCloudflareProps; export {}; //# sourceMappingURL=event-type-check.d.ts.map