Skip to content

Commit c3a43f6

Browse files
committed
Add fetch to BindingStorage
1 parent 16d36ce commit c3a43f6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openworkers/workers-types",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"description": "TypeScript types for the OpenWorkers runtime",
55
"license": "MIT",
66
"repository": {

types/bindings.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ declare global {
9898
* Deletes a key.
9999
*/
100100
delete(key: string): Promise<void>;
101+
102+
/**
103+
* Fetches a static asset from the bundle (same as BindingAssets).
104+
* @param input The asset path, URL, or request.
105+
* @param init Optional request options.
106+
*/
107+
fetch(input: Request | string | URL, init?: RequestInit): Promise<Response>;
101108
}
102109

103110
/**

0 commit comments

Comments
 (0)