Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 18ca7fc

Browse files
authored
Pages Functions assets imports type (#234)
1 parent ceec72b commit 18ca7fc

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.changeset/tender-dodos-switch.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/workers-types": minor
3+
---
4+
5+
feat: Adds the Pages Functions asset imports type. More info on [our docs](https://developers.cloudflare.com/pages/platform/functions/plugins/).

index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2013,3 +2013,7 @@ declare type PagesPluginFunction<
20132013
> = (
20142014
context: EventPluginContext<Env, Params, Data, PluginArgs>
20152015
) => Response | Promise<Response>;
2016+
2017+
declare module "assets:*" {
2018+
export const onRequest: PagesFunction;
2019+
}

manual-ts/pages.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ declare type PagesPluginFunction<
3535
> = (
3636
context: EventPluginContext<Env, Params, Data, PluginArgs>
3737
) => Response | Promise<Response>;
38+
39+
declare module "assets:*" {
40+
export const onRequest: PagesFunction;
41+
}

0 commit comments

Comments
 (0)