@cloudflare/workers-types 4.20250909.0 → 4.20250911.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/2021-11-03/index.d.ts +94 -12
- package/2021-11-03/index.ts +94 -12
- package/2022-01-31/index.d.ts +94 -12
- package/2022-01-31/index.ts +94 -12
- package/2022-03-21/index.d.ts +94 -12
- package/2022-03-21/index.ts +94 -12
- package/2022-08-04/index.d.ts +94 -12
- package/2022-08-04/index.ts +94 -12
- package/2022-10-31/index.d.ts +94 -12
- package/2022-10-31/index.ts +94 -12
- package/2022-11-30/index.d.ts +94 -12
- package/2022-11-30/index.ts +94 -12
- package/2023-03-01/index.d.ts +94 -12
- package/2023-03-01/index.ts +94 -12
- package/2023-07-01/index.d.ts +94 -12
- package/2023-07-01/index.ts +94 -12
- package/experimental/index.d.ts +170 -12
- package/experimental/index.ts +170 -12
- package/index.d.ts +94 -12
- package/index.ts +94 -12
- package/latest/index.d.ts +170 -12
- package/latest/index.ts +170 -12
- package/oldest/index.d.ts +94 -12
- package/oldest/index.ts +94 -12
- package/package.json +1 -1
package/oldest/index.ts
CHANGED
|
@@ -287,6 +287,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
287
287
|
FixedLengthStream: typeof FixedLengthStream;
|
|
288
288
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
289
289
|
HTMLRewriter: typeof HTMLRewriter;
|
|
290
|
+
Performance: typeof Performance;
|
|
290
291
|
}
|
|
291
292
|
export declare function addEventListener<
|
|
292
293
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -448,18 +449,6 @@ export declare abstract class PromiseRejectionEvent extends Event {
|
|
|
448
449
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
449
450
|
readonly reason: any;
|
|
450
451
|
}
|
|
451
|
-
/**
|
|
452
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
453
|
-
* as well as timing of subrequests and other operations.
|
|
454
|
-
*
|
|
455
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
456
|
-
*/
|
|
457
|
-
export interface Performance {
|
|
458
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
459
|
-
readonly timeOrigin: number;
|
|
460
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
461
|
-
now(): number;
|
|
462
|
-
}
|
|
463
452
|
export interface AlarmInvocationInfo {
|
|
464
453
|
readonly isRetry: boolean;
|
|
465
454
|
readonly retryCount: number;
|
|
@@ -3060,6 +3049,99 @@ export interface SyncKvListOptions {
|
|
|
3060
3049
|
reverse?: boolean;
|
|
3061
3050
|
limit?: number;
|
|
3062
3051
|
}
|
|
3052
|
+
/**
|
|
3053
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3054
|
+
* as well as timing of subrequests and other operations.
|
|
3055
|
+
*
|
|
3056
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3057
|
+
*/
|
|
3058
|
+
export declare abstract class Performance extends EventTarget {
|
|
3059
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3060
|
+
get timeOrigin(): number;
|
|
3061
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3062
|
+
now(): number;
|
|
3063
|
+
get eventCounts(): EventCounts;
|
|
3064
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
|
|
3065
|
+
clearMarks(name?: string): void;
|
|
3066
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
|
|
3067
|
+
clearMeasures(name?: string): void;
|
|
3068
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
|
|
3069
|
+
clearResourceTimings(): void;
|
|
3070
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
|
|
3071
|
+
getEntries(): PerformanceEntry[];
|
|
3072
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
|
|
3073
|
+
getEntriesByName(name: string, type: string): PerformanceEntry[];
|
|
3074
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
|
|
3075
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3076
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
|
|
3077
|
+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3078
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
|
|
3079
|
+
measure(
|
|
3080
|
+
measureName: string,
|
|
3081
|
+
measureOptionsOrStartMark: PerformanceMeasureOptions | string,
|
|
3082
|
+
maybeEndMark?: string,
|
|
3083
|
+
): PerformanceMeasure;
|
|
3084
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
|
|
3085
|
+
setResourceTimingBufferSize(size: number): void;
|
|
3086
|
+
}
|
|
3087
|
+
/**
|
|
3088
|
+
* PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline.
|
|
3089
|
+
*
|
|
3090
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3091
|
+
*/
|
|
3092
|
+
export interface PerformanceMark extends PerformanceEntry {
|
|
3093
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
|
|
3094
|
+
get detail(): any;
|
|
3095
|
+
}
|
|
3096
|
+
/**
|
|
3097
|
+
* PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.
|
|
3098
|
+
*
|
|
3099
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3100
|
+
*/
|
|
3101
|
+
export interface PerformanceMeasure extends PerformanceEntry {
|
|
3102
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
|
|
3103
|
+
get detail(): any;
|
|
3104
|
+
}
|
|
3105
|
+
export interface PerformanceMarkOptions {
|
|
3106
|
+
detail?: any;
|
|
3107
|
+
startTime?: number;
|
|
3108
|
+
}
|
|
3109
|
+
export interface PerformanceMeasureOptions {
|
|
3110
|
+
detail?: any;
|
|
3111
|
+
start?: number;
|
|
3112
|
+
duration?: number;
|
|
3113
|
+
end?: number;
|
|
3114
|
+
}
|
|
3115
|
+
/**
|
|
3116
|
+
* Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image).
|
|
3117
|
+
*
|
|
3118
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
3119
|
+
*/
|
|
3120
|
+
export declare abstract class PerformanceEntry {
|
|
3121
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
|
|
3122
|
+
get name(): string;
|
|
3123
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
|
|
3124
|
+
get entryType(): string;
|
|
3125
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
|
|
3126
|
+
get startTime(): number;
|
|
3127
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
|
|
3128
|
+
get duration(): number;
|
|
3129
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
|
|
3130
|
+
toJSON(): any;
|
|
3131
|
+
}
|
|
3132
|
+
export interface EventCounts {
|
|
3133
|
+
get size(): number;
|
|
3134
|
+
get(eventType: string): number | undefined;
|
|
3135
|
+
has(eventType: string): boolean;
|
|
3136
|
+
entries(): IterableIterator<string[]>;
|
|
3137
|
+
keys(): IterableIterator<string>;
|
|
3138
|
+
values(): IterableIterator<number>;
|
|
3139
|
+
forEach(
|
|
3140
|
+
param1: (param0: number, param1: string, param2: EventCounts) => void,
|
|
3141
|
+
param2?: any,
|
|
3142
|
+
): void;
|
|
3143
|
+
[Symbol.iterator](): IterableIterator<string[]>;
|
|
3144
|
+
}
|
|
3063
3145
|
export type AiImageClassificationInput = {
|
|
3064
3146
|
image: number[];
|
|
3065
3147
|
};
|
package/package.json
CHANGED