Tay
Tay
Explore posts from servers
CDCloudflare Developers
Created by Tay on 8/31/2023 in #pages-help
Accessing Cache API Typescript
Got it. Is the doc I linked outdated then?
9 replies
CDCloudflare Developers
Created by Tay on 8/31/2023 in #pages-help
Accessing Cache API Typescript
Ah my bad I meant workers. For workers would i access it via the global variable?
9 replies
CDCloudflare Developers
Created by Tay on 8/31/2023 in #pages-help
Accessing Cache API Typescript
my typescript definition doesn't show a third argument nor an object?
declare interface ExportedHandler<
Env = unknown,
QueueHandlerMessage = unknown,
CfHostMetadata = unknown
> {
fetch?: ExportedHandlerFetchHandler<Env, CfHostMetadata>;
tail?: ExportedHandlerTailHandler<Env>;
trace?: ExportedHandlerTraceHandler<Env>;
scheduled?: ExportedHandlerScheduledHandler<Env>;
test?: ExportedHandlerTestHandler<Env>;
email?: EmailExportedHandler<Env>;
queue?: ExportedHandlerQueueHandler<Env, QueueHandlerMessage>;
}
declare interface ExportedHandler<
Env = unknown,
QueueHandlerMessage = unknown,
CfHostMetadata = unknown
> {
fetch?: ExportedHandlerFetchHandler<Env, CfHostMetadata>;
tail?: ExportedHandlerTailHandler<Env>;
trace?: ExportedHandlerTraceHandler<Env>;
scheduled?: ExportedHandlerScheduledHandler<Env>;
test?: ExportedHandlerTestHandler<Env>;
email?: EmailExportedHandler<Env>;
queue?: ExportedHandlerQueueHandler<Env, QueueHandlerMessage>;
}
9 replies
CDCloudflare Developers
Created by Tay on 8/31/2023 in #pages-help
Accessing Cache API Typescript
why do these examples have a third parameter? https://developers.cloudflare.com/workers/examples/cache-api/
9 replies