@workers-community/workers-types 4.20250912.0 → 4.20250917.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/index.d.ts +13 -14
- package/index.ts +13 -14
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -294,7 +294,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
294
294
|
FixedLengthStream: typeof FixedLengthStream;
|
|
295
295
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
296
296
|
HTMLRewriter: typeof HTMLRewriter;
|
|
297
|
-
Performance: typeof Performance;
|
|
298
297
|
}
|
|
299
298
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
300
299
|
type: Type,
|
|
@@ -467,6 +466,18 @@ declare abstract class Navigator {
|
|
|
467
466
|
readonly userAgent: string;
|
|
468
467
|
readonly hardwareConcurrency: number;
|
|
469
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
471
|
+
* as well as timing of subrequests and other operations.
|
|
472
|
+
*
|
|
473
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
474
|
+
*/
|
|
475
|
+
interface Performance {
|
|
476
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
477
|
+
readonly timeOrigin: number;
|
|
478
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
479
|
+
now(): number;
|
|
480
|
+
}
|
|
470
481
|
interface AlarmInvocationInfo {
|
|
471
482
|
readonly isRetry: boolean;
|
|
472
483
|
readonly retryCount: number;
|
|
@@ -541,7 +552,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
|
|
|
541
552
|
locationHint?: DurableObjectLocationHint;
|
|
542
553
|
}
|
|
543
554
|
interface DurableObjectClass<
|
|
544
|
-
|
|
555
|
+
_T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
545
556
|
> {}
|
|
546
557
|
interface DurableObjectState<Props = unknown> {
|
|
547
558
|
waitUntil(promise: Promise<any>): void;
|
|
@@ -3155,18 +3166,6 @@ interface WorkerLoaderWorkerCode {
|
|
|
3155
3166
|
tails?: Fetcher[];
|
|
3156
3167
|
streamingTails?: Fetcher[];
|
|
3157
3168
|
}
|
|
3158
|
-
/**
|
|
3159
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3160
|
-
* as well as timing of subrequests and other operations.
|
|
3161
|
-
*
|
|
3162
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3163
|
-
*/
|
|
3164
|
-
declare abstract class Performance {
|
|
3165
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3166
|
-
get timeOrigin(): number;
|
|
3167
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3168
|
-
now(): number;
|
|
3169
|
-
}
|
|
3170
3169
|
type AiImageClassificationInput = {
|
|
3171
3170
|
image: number[];
|
|
3172
3171
|
};
|
package/index.ts
CHANGED
|
@@ -294,7 +294,6 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
294
294
|
FixedLengthStream: typeof FixedLengthStream;
|
|
295
295
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
296
296
|
HTMLRewriter: typeof HTMLRewriter;
|
|
297
|
-
Performance: typeof Performance;
|
|
298
297
|
}
|
|
299
298
|
export declare function addEventListener<
|
|
300
299
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -472,6 +471,18 @@ export declare abstract class Navigator {
|
|
|
472
471
|
readonly userAgent: string;
|
|
473
472
|
readonly hardwareConcurrency: number;
|
|
474
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
476
|
+
* as well as timing of subrequests and other operations.
|
|
477
|
+
*
|
|
478
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
479
|
+
*/
|
|
480
|
+
export interface Performance {
|
|
481
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
482
|
+
readonly timeOrigin: number;
|
|
483
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
484
|
+
now(): number;
|
|
485
|
+
}
|
|
475
486
|
export interface AlarmInvocationInfo {
|
|
476
487
|
readonly isRetry: boolean;
|
|
477
488
|
readonly retryCount: number;
|
|
@@ -546,7 +557,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
|
|
|
546
557
|
locationHint?: DurableObjectLocationHint;
|
|
547
558
|
}
|
|
548
559
|
export interface DurableObjectClass<
|
|
549
|
-
|
|
560
|
+
_T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
550
561
|
> {}
|
|
551
562
|
export interface DurableObjectState<Props = unknown> {
|
|
552
563
|
waitUntil(promise: Promise<any>): void;
|
|
@@ -3166,18 +3177,6 @@ export interface WorkerLoaderWorkerCode {
|
|
|
3166
3177
|
tails?: Fetcher[];
|
|
3167
3178
|
streamingTails?: Fetcher[];
|
|
3168
3179
|
}
|
|
3169
|
-
/**
|
|
3170
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3171
|
-
* as well as timing of subrequests and other operations.
|
|
3172
|
-
*
|
|
3173
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3174
|
-
*/
|
|
3175
|
-
export declare abstract class Performance {
|
|
3176
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3177
|
-
get timeOrigin(): number;
|
|
3178
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3179
|
-
now(): number;
|
|
3180
|
-
}
|
|
3181
3180
|
export type AiImageClassificationInput = {
|
|
3182
3181
|
image: number[];
|
|
3183
3182
|
};
|