@cloudflare/workers-types 4.20250719.0 → 4.20250723.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/experimental/index.d.ts +5 -33
- package/experimental/index.ts +5 -33
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -261,7 +261,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
261
261
|
FileSystemFileHandle: typeof FileSystemFileHandle;
|
|
262
262
|
FileSystemDirectoryHandle: typeof FileSystemDirectoryHandle;
|
|
263
263
|
FileSystemWritableFileStream: typeof FileSystemWritableFileStream;
|
|
264
|
-
FileSystemSyncAccessHandle: typeof FileSystemSyncAccessHandle;
|
|
265
264
|
StorageManager: typeof StorageManager;
|
|
266
265
|
EventSource: typeof EventSource;
|
|
267
266
|
ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
|
|
@@ -3141,6 +3140,8 @@ declare abstract class FileSystemHandle {
|
|
|
3141
3140
|
get name(): string;
|
|
3142
3141
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */
|
|
3143
3142
|
isSameEntry(other: FileSystemHandle): Promise<boolean>;
|
|
3143
|
+
getUniqueId(): Promise<string>;
|
|
3144
|
+
remove(options?: FileSystemHandleRemoveOptions): Promise<void>;
|
|
3144
3145
|
}
|
|
3145
3146
|
/**
|
|
3146
3147
|
* Available only in secure contexts.
|
|
@@ -3154,9 +3155,6 @@ declare abstract class FileSystemFileHandle extends FileSystemHandle {
|
|
|
3154
3155
|
createWritable(
|
|
3155
3156
|
options?: FileSystemFileHandleFileSystemCreateWritableOptions,
|
|
3156
3157
|
): Promise<FileSystemWritableFileStream>;
|
|
3157
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle) */
|
|
3158
|
-
createSyncAccessHandle(): Promise<FileSystemSyncAccessHandle>;
|
|
3159
|
-
getUniqueId(): Promise<string>;
|
|
3160
3158
|
}
|
|
3161
3159
|
/**
|
|
3162
3160
|
* Available only in secure contexts.
|
|
@@ -3192,7 +3190,6 @@ declare abstract class FileSystemDirectoryHandle extends FileSystemHandle {
|
|
|
3192
3190
|
) => void,
|
|
3193
3191
|
thisArg?: any,
|
|
3194
3192
|
): void;
|
|
3195
|
-
getUniqueId(): Promise<string>;
|
|
3196
3193
|
[Symbol.asyncIterator](): AsyncIterableIterator<FileSystemDirectoryHandleEntryType>;
|
|
3197
3194
|
}
|
|
3198
3195
|
/**
|
|
@@ -3214,31 +3211,6 @@ declare abstract class FileSystemWritableFileStream extends WritableStream {
|
|
|
3214
3211
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate) */
|
|
3215
3212
|
truncate(size: number): Promise<void>;
|
|
3216
3213
|
}
|
|
3217
|
-
/**
|
|
3218
|
-
* Available only in secure contexts.
|
|
3219
|
-
*
|
|
3220
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle)
|
|
3221
|
-
*/
|
|
3222
|
-
declare abstract class FileSystemSyncAccessHandle {
|
|
3223
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */
|
|
3224
|
-
read(
|
|
3225
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
3226
|
-
options?: FileSystemSyncAccessHandleFileSystemReadWriteOptions,
|
|
3227
|
-
): number;
|
|
3228
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */
|
|
3229
|
-
write(
|
|
3230
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
3231
|
-
options?: FileSystemSyncAccessHandleFileSystemReadWriteOptions,
|
|
3232
|
-
): number;
|
|
3233
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */
|
|
3234
|
-
truncate(newSize: number): void;
|
|
3235
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */
|
|
3236
|
-
getSize(): number;
|
|
3237
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/flush) */
|
|
3238
|
-
flush(): void;
|
|
3239
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/close) */
|
|
3240
|
-
close(): void;
|
|
3241
|
-
}
|
|
3242
3214
|
/**
|
|
3243
3215
|
* Available only in secure contexts.
|
|
3244
3216
|
*
|
|
@@ -3260,9 +3232,6 @@ interface FileSystemDirectoryHandleFileSystemGetDirectoryOptions {
|
|
|
3260
3232
|
interface FileSystemDirectoryHandleFileSystemRemoveOptions {
|
|
3261
3233
|
recursive: boolean;
|
|
3262
3234
|
}
|
|
3263
|
-
interface FileSystemSyncAccessHandleFileSystemReadWriteOptions {
|
|
3264
|
-
at?: number;
|
|
3265
|
-
}
|
|
3266
3235
|
interface FileSystemWritableFileStreamWriteParams {
|
|
3267
3236
|
type: string;
|
|
3268
3237
|
size?: number;
|
|
@@ -3273,6 +3242,9 @@ interface FileSystemDirectoryHandleEntryType {
|
|
|
3273
3242
|
key: string;
|
|
3274
3243
|
value: FileSystemHandle;
|
|
3275
3244
|
}
|
|
3245
|
+
interface FileSystemHandleRemoveOptions {
|
|
3246
|
+
recursive?: boolean;
|
|
3247
|
+
}
|
|
3276
3248
|
type AiImageClassificationInput = {
|
|
3277
3249
|
image: number[];
|
|
3278
3250
|
};
|
package/experimental/index.ts
CHANGED
|
@@ -261,7 +261,6 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
261
261
|
FileSystemFileHandle: typeof FileSystemFileHandle;
|
|
262
262
|
FileSystemDirectoryHandle: typeof FileSystemDirectoryHandle;
|
|
263
263
|
FileSystemWritableFileStream: typeof FileSystemWritableFileStream;
|
|
264
|
-
FileSystemSyncAccessHandle: typeof FileSystemSyncAccessHandle;
|
|
265
264
|
StorageManager: typeof StorageManager;
|
|
266
265
|
EventSource: typeof EventSource;
|
|
267
266
|
ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
|
|
@@ -3153,6 +3152,8 @@ export declare abstract class FileSystemHandle {
|
|
|
3153
3152
|
get name(): string;
|
|
3154
3153
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */
|
|
3155
3154
|
isSameEntry(other: FileSystemHandle): Promise<boolean>;
|
|
3155
|
+
getUniqueId(): Promise<string>;
|
|
3156
|
+
remove(options?: FileSystemHandleRemoveOptions): Promise<void>;
|
|
3156
3157
|
}
|
|
3157
3158
|
/**
|
|
3158
3159
|
* Available only in secure contexts.
|
|
@@ -3166,9 +3167,6 @@ export declare abstract class FileSystemFileHandle extends FileSystemHandle {
|
|
|
3166
3167
|
createWritable(
|
|
3167
3168
|
options?: FileSystemFileHandleFileSystemCreateWritableOptions,
|
|
3168
3169
|
): Promise<FileSystemWritableFileStream>;
|
|
3169
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle) */
|
|
3170
|
-
createSyncAccessHandle(): Promise<FileSystemSyncAccessHandle>;
|
|
3171
|
-
getUniqueId(): Promise<string>;
|
|
3172
3170
|
}
|
|
3173
3171
|
/**
|
|
3174
3172
|
* Available only in secure contexts.
|
|
@@ -3204,7 +3202,6 @@ export declare abstract class FileSystemDirectoryHandle extends FileSystemHandle
|
|
|
3204
3202
|
) => void,
|
|
3205
3203
|
thisArg?: any,
|
|
3206
3204
|
): void;
|
|
3207
|
-
getUniqueId(): Promise<string>;
|
|
3208
3205
|
[Symbol.asyncIterator](): AsyncIterableIterator<FileSystemDirectoryHandleEntryType>;
|
|
3209
3206
|
}
|
|
3210
3207
|
/**
|
|
@@ -3226,31 +3223,6 @@ export declare abstract class FileSystemWritableFileStream extends WritableStrea
|
|
|
3226
3223
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate) */
|
|
3227
3224
|
truncate(size: number): Promise<void>;
|
|
3228
3225
|
}
|
|
3229
|
-
/**
|
|
3230
|
-
* Available only in secure contexts.
|
|
3231
|
-
*
|
|
3232
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle)
|
|
3233
|
-
*/
|
|
3234
|
-
export declare abstract class FileSystemSyncAccessHandle {
|
|
3235
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */
|
|
3236
|
-
read(
|
|
3237
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
3238
|
-
options?: FileSystemSyncAccessHandleFileSystemReadWriteOptions,
|
|
3239
|
-
): number;
|
|
3240
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */
|
|
3241
|
-
write(
|
|
3242
|
-
buffer: ArrayBuffer | ArrayBufferView,
|
|
3243
|
-
options?: FileSystemSyncAccessHandleFileSystemReadWriteOptions,
|
|
3244
|
-
): number;
|
|
3245
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */
|
|
3246
|
-
truncate(newSize: number): void;
|
|
3247
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */
|
|
3248
|
-
getSize(): number;
|
|
3249
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/flush) */
|
|
3250
|
-
flush(): void;
|
|
3251
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/close) */
|
|
3252
|
-
close(): void;
|
|
3253
|
-
}
|
|
3254
3226
|
/**
|
|
3255
3227
|
* Available only in secure contexts.
|
|
3256
3228
|
*
|
|
@@ -3272,9 +3244,6 @@ export interface FileSystemDirectoryHandleFileSystemGetDirectoryOptions {
|
|
|
3272
3244
|
export interface FileSystemDirectoryHandleFileSystemRemoveOptions {
|
|
3273
3245
|
recursive: boolean;
|
|
3274
3246
|
}
|
|
3275
|
-
export interface FileSystemSyncAccessHandleFileSystemReadWriteOptions {
|
|
3276
|
-
at?: number;
|
|
3277
|
-
}
|
|
3278
3247
|
export interface FileSystemWritableFileStreamWriteParams {
|
|
3279
3248
|
type: string;
|
|
3280
3249
|
size?: number;
|
|
@@ -3285,6 +3254,9 @@ export interface FileSystemDirectoryHandleEntryType {
|
|
|
3285
3254
|
key: string;
|
|
3286
3255
|
value: FileSystemHandle;
|
|
3287
3256
|
}
|
|
3257
|
+
export interface FileSystemHandleRemoveOptions {
|
|
3258
|
+
recursive?: boolean;
|
|
3259
|
+
}
|
|
3288
3260
|
export type AiImageClassificationInput = {
|
|
3289
3261
|
image: number[];
|
|
3290
3262
|
};
|
package/package.json
CHANGED