@cloudflare/workers-types 5.20261009.1 → 5.20261010.1
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 +22 -24
- package/experimental/index.ts +1 -9
- package/index.d.ts +22 -24
- package/index.ts +1 -9
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -4009,15 +4009,7 @@ type SqlStorageValue = ArrayBuffer | string | number | null;
|
|
|
4009
4009
|
declare abstract class SqlStorageCursor<
|
|
4010
4010
|
T extends Record<string, SqlStorageValue>,
|
|
4011
4011
|
> {
|
|
4012
|
-
next():
|
|
4013
|
-
| {
|
|
4014
|
-
done?: false;
|
|
4015
|
-
value: T;
|
|
4016
|
-
}
|
|
4017
|
-
| {
|
|
4018
|
-
done: true;
|
|
4019
|
-
value?: never;
|
|
4020
|
-
};
|
|
4012
|
+
next(): IteratorResult<T, undefined>;
|
|
4021
4013
|
toArray(): T[];
|
|
4022
4014
|
one(): T;
|
|
4023
4015
|
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
|
@@ -15434,26 +15426,32 @@ declare abstract class D1PreparedStatement {
|
|
|
15434
15426
|
interface Disposable {}
|
|
15435
15427
|
declare module "cloudflare:durable-objects" {
|
|
15436
15428
|
/**
|
|
15437
|
-
* Marks
|
|
15438
|
-
* to
|
|
15429
|
+
* Marks Durable Object methods as safe to run more than once. The runtime may then retry calls
|
|
15430
|
+
* to them after a disconnect that might have happened after the method started. It does not
|
|
15439
15431
|
* enable retries or change how many are made.
|
|
15440
15432
|
*
|
|
15433
|
+
* Mark methods on the class prototype, for example from a static block:
|
|
15434
|
+
*
|
|
15435
|
+
* ```ts
|
|
15436
|
+
* class Counter extends DurableObject {
|
|
15437
|
+
* static {
|
|
15438
|
+
* retryable(this.prototype.reset);
|
|
15439
|
+
* }
|
|
15440
|
+
* async reset() {}
|
|
15441
|
+
* }
|
|
15442
|
+
* ```
|
|
15443
|
+
*
|
|
15444
|
+
* The mark is on the function itself. A subclass inherits it, but an override, a bound copy, or
|
|
15445
|
+
* a wrapper is not marked unless it is also passed to `retryable()`.
|
|
15446
|
+
*
|
|
15441
15447
|
* Each attempt creates its own return value, so if the method returns an `RpcTarget`, its
|
|
15442
15448
|
* `[Symbol.dispose]()` may run once per attempt.
|
|
15443
15449
|
*
|
|
15444
|
-
*
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
|
|
15449
|
-
*/
|
|
15450
|
-
export function retryable<This, Args extends unknown[], Return>(
|
|
15451
|
-
value: (this: This, ...args: Args) => Return,
|
|
15452
|
-
context: ClassMethodDecoratorContext<
|
|
15453
|
-
This,
|
|
15454
|
-
(this: This, ...args: Args) => Return
|
|
15455
|
-
>,
|
|
15456
|
-
): (this: This, ...args: Args) => Return;
|
|
15450
|
+
* @throws TypeError if an argument is not a function.
|
|
15451
|
+
*/
|
|
15452
|
+
export function retryable(
|
|
15453
|
+
...methods: ((...args: never[]) => unknown)[]
|
|
15454
|
+
): void;
|
|
15457
15455
|
}
|
|
15458
15456
|
/**
|
|
15459
15457
|
* The returned data after sending an email
|
package/experimental/index.ts
CHANGED
|
@@ -4018,15 +4018,7 @@ export type SqlStorageValue = ArrayBuffer | string | number | null;
|
|
|
4018
4018
|
export declare abstract class SqlStorageCursor<
|
|
4019
4019
|
T extends Record<string, SqlStorageValue>,
|
|
4020
4020
|
> {
|
|
4021
|
-
next():
|
|
4022
|
-
| {
|
|
4023
|
-
done?: false;
|
|
4024
|
-
value: T;
|
|
4025
|
-
}
|
|
4026
|
-
| {
|
|
4027
|
-
done: true;
|
|
4028
|
-
value?: never;
|
|
4029
|
-
};
|
|
4021
|
+
next(): IteratorResult<T, undefined>;
|
|
4030
4022
|
toArray(): T[];
|
|
4031
4023
|
one(): T;
|
|
4032
4024
|
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
package/index.d.ts
CHANGED
|
@@ -3863,15 +3863,7 @@ type SqlStorageValue = ArrayBuffer | string | number | null;
|
|
|
3863
3863
|
declare abstract class SqlStorageCursor<
|
|
3864
3864
|
T extends Record<string, SqlStorageValue>,
|
|
3865
3865
|
> {
|
|
3866
|
-
next():
|
|
3867
|
-
| {
|
|
3868
|
-
done?: false;
|
|
3869
|
-
value: T;
|
|
3870
|
-
}
|
|
3871
|
-
| {
|
|
3872
|
-
done: true;
|
|
3873
|
-
value?: never;
|
|
3874
|
-
};
|
|
3866
|
+
next(): IteratorResult<T, undefined>;
|
|
3875
3867
|
toArray(): T[];
|
|
3876
3868
|
one(): T;
|
|
3877
3869
|
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
|
@@ -15086,26 +15078,32 @@ declare abstract class D1PreparedStatement {
|
|
|
15086
15078
|
interface Disposable {}
|
|
15087
15079
|
declare module "cloudflare:durable-objects" {
|
|
15088
15080
|
/**
|
|
15089
|
-
* Marks
|
|
15090
|
-
* to
|
|
15081
|
+
* Marks Durable Object methods as safe to run more than once. The runtime may then retry calls
|
|
15082
|
+
* to them after a disconnect that might have happened after the method started. It does not
|
|
15091
15083
|
* enable retries or change how many are made.
|
|
15092
15084
|
*
|
|
15085
|
+
* Mark methods on the class prototype, for example from a static block:
|
|
15086
|
+
*
|
|
15087
|
+
* ```ts
|
|
15088
|
+
* class Counter extends DurableObject {
|
|
15089
|
+
* static {
|
|
15090
|
+
* retryable(this.prototype.reset);
|
|
15091
|
+
* }
|
|
15092
|
+
* async reset() {}
|
|
15093
|
+
* }
|
|
15094
|
+
* ```
|
|
15095
|
+
*
|
|
15096
|
+
* The mark is on the function itself. A subclass inherits it, but an override, a bound copy, or
|
|
15097
|
+
* a wrapper is not marked unless it is also passed to `retryable()`.
|
|
15098
|
+
*
|
|
15093
15099
|
* Each attempt creates its own return value, so if the method returns an `RpcTarget`, its
|
|
15094
15100
|
* `[Symbol.dispose]()` may run once per attempt.
|
|
15095
15101
|
*
|
|
15096
|
-
*
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15100
|
-
|
|
15101
|
-
*/
|
|
15102
|
-
export function retryable<This, Args extends unknown[], Return>(
|
|
15103
|
-
value: (this: This, ...args: Args) => Return,
|
|
15104
|
-
context: ClassMethodDecoratorContext<
|
|
15105
|
-
This,
|
|
15106
|
-
(this: This, ...args: Args) => Return
|
|
15107
|
-
>,
|
|
15108
|
-
): (this: This, ...args: Args) => Return;
|
|
15102
|
+
* @throws TypeError if an argument is not a function.
|
|
15103
|
+
*/
|
|
15104
|
+
export function retryable(
|
|
15105
|
+
...methods: ((...args: never[]) => unknown)[]
|
|
15106
|
+
): void;
|
|
15109
15107
|
}
|
|
15110
15108
|
/**
|
|
15111
15109
|
* The returned data after sending an email
|
package/index.ts
CHANGED
|
@@ -3872,15 +3872,7 @@ export type SqlStorageValue = ArrayBuffer | string | number | null;
|
|
|
3872
3872
|
export declare abstract class SqlStorageCursor<
|
|
3873
3873
|
T extends Record<string, SqlStorageValue>,
|
|
3874
3874
|
> {
|
|
3875
|
-
next():
|
|
3876
|
-
| {
|
|
3877
|
-
done?: false;
|
|
3878
|
-
value: T;
|
|
3879
|
-
}
|
|
3880
|
-
| {
|
|
3881
|
-
done: true;
|
|
3882
|
-
value?: never;
|
|
3883
|
-
};
|
|
3875
|
+
next(): IteratorResult<T, undefined>;
|
|
3884
3876
|
toArray(): T[];
|
|
3885
3877
|
one(): T;
|
|
3886
3878
|
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
package/package.json
CHANGED