@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.
@@ -289,6 +289,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
289
289
  FixedLengthStream: typeof FixedLengthStream;
290
290
  IdentityTransformStream: typeof IdentityTransformStream;
291
291
  HTMLRewriter: typeof HTMLRewriter;
292
+ Performance: typeof Performance;
292
293
  }
293
294
  export declare function addEventListener<
294
295
  Type extends keyof WorkerGlobalScopeEventMap,
@@ -466,18 +467,6 @@ export declare abstract class Navigator {
466
467
  readonly userAgent: string;
467
468
  readonly hardwareConcurrency: number;
468
469
  }
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
- export 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
- }
481
470
  export interface AlarmInvocationInfo {
482
471
  readonly isRetry: boolean;
483
472
  readonly retryCount: number;
@@ -3104,6 +3093,99 @@ export interface SyncKvListOptions {
3104
3093
  reverse?: boolean;
3105
3094
  limit?: number;
3106
3095
  }
3096
+ /**
3097
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3098
+ * as well as timing of subrequests and other operations.
3099
+ *
3100
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3101
+ */
3102
+ export declare abstract class Performance extends EventTarget {
3103
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3104
+ get timeOrigin(): number;
3105
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3106
+ now(): number;
3107
+ get eventCounts(): EventCounts;
3108
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3109
+ clearMarks(name?: string): void;
3110
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3111
+ clearMeasures(name?: string): void;
3112
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3113
+ clearResourceTimings(): void;
3114
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3115
+ getEntries(): PerformanceEntry[];
3116
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3117
+ getEntriesByName(name: string, type: string): PerformanceEntry[];
3118
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3119
+ getEntriesByType(type: string): PerformanceEntry[];
3120
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3121
+ mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3122
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3123
+ measure(
3124
+ measureName: string,
3125
+ measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3126
+ maybeEndMark?: string,
3127
+ ): PerformanceMeasure;
3128
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3129
+ setResourceTimingBufferSize(size: number): void;
3130
+ }
3131
+ /**
3132
+ * 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.
3133
+ *
3134
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3135
+ */
3136
+ export interface PerformanceMark extends PerformanceEntry {
3137
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3138
+ get detail(): any;
3139
+ }
3140
+ /**
3141
+ * 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.
3142
+ *
3143
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3144
+ */
3145
+ export interface PerformanceMeasure extends PerformanceEntry {
3146
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3147
+ get detail(): any;
3148
+ }
3149
+ export interface PerformanceMarkOptions {
3150
+ detail?: any;
3151
+ startTime?: number;
3152
+ }
3153
+ export interface PerformanceMeasureOptions {
3154
+ detail?: any;
3155
+ start?: number;
3156
+ duration?: number;
3157
+ end?: number;
3158
+ }
3159
+ /**
3160
+ * 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).
3161
+ *
3162
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3163
+ */
3164
+ export declare abstract class PerformanceEntry {
3165
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3166
+ get name(): string;
3167
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3168
+ get entryType(): string;
3169
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3170
+ get startTime(): number;
3171
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3172
+ get duration(): number;
3173
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3174
+ toJSON(): any;
3175
+ }
3176
+ export interface EventCounts {
3177
+ get size(): number;
3178
+ get(eventType: string): number | undefined;
3179
+ has(eventType: string): boolean;
3180
+ entries(): IterableIterator<string[]>;
3181
+ keys(): IterableIterator<string>;
3182
+ values(): IterableIterator<number>;
3183
+ forEach(
3184
+ param1: (param0: number, param1: string, param2: EventCounts) => void,
3185
+ param2?: any,
3186
+ ): void;
3187
+ [Symbol.iterator](): IterableIterator<string[]>;
3188
+ }
3107
3189
  export type AiImageClassificationInput = {
3108
3190
  image: number[];
3109
3191
  };
@@ -289,6 +289,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
289
289
  FixedLengthStream: typeof FixedLengthStream;
290
290
  IdentityTransformStream: typeof IdentityTransformStream;
291
291
  HTMLRewriter: typeof HTMLRewriter;
292
+ Performance: typeof Performance;
292
293
  }
293
294
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
294
295
  type: Type,
@@ -461,18 +462,6 @@ declare abstract class Navigator {
461
462
  readonly userAgent: string;
462
463
  readonly hardwareConcurrency: number;
463
464
  }
464
- /**
465
- * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
466
- * as well as timing of subrequests and other operations.
467
- *
468
- * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
469
- */
470
- interface Performance {
471
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
472
- readonly timeOrigin: number;
473
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
474
- now(): number;
475
- }
476
465
  interface AlarmInvocationInfo {
477
466
  readonly isRetry: boolean;
478
467
  readonly retryCount: number;
@@ -3094,6 +3083,99 @@ interface SyncKvListOptions {
3094
3083
  reverse?: boolean;
3095
3084
  limit?: number;
3096
3085
  }
3086
+ /**
3087
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3088
+ * as well as timing of subrequests and other operations.
3089
+ *
3090
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3091
+ */
3092
+ declare abstract class Performance extends EventTarget {
3093
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3094
+ get timeOrigin(): number;
3095
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3096
+ now(): number;
3097
+ get eventCounts(): EventCounts;
3098
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3099
+ clearMarks(name?: string): void;
3100
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3101
+ clearMeasures(name?: string): void;
3102
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3103
+ clearResourceTimings(): void;
3104
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3105
+ getEntries(): PerformanceEntry[];
3106
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3107
+ getEntriesByName(name: string, type: string): PerformanceEntry[];
3108
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3109
+ getEntriesByType(type: string): PerformanceEntry[];
3110
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3111
+ mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3112
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3113
+ measure(
3114
+ measureName: string,
3115
+ measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3116
+ maybeEndMark?: string,
3117
+ ): PerformanceMeasure;
3118
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3119
+ setResourceTimingBufferSize(size: number): void;
3120
+ }
3121
+ /**
3122
+ * 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.
3123
+ *
3124
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3125
+ */
3126
+ interface PerformanceMark extends PerformanceEntry {
3127
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3128
+ get detail(): any;
3129
+ }
3130
+ /**
3131
+ * 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.
3132
+ *
3133
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3134
+ */
3135
+ interface PerformanceMeasure extends PerformanceEntry {
3136
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3137
+ get detail(): any;
3138
+ }
3139
+ interface PerformanceMarkOptions {
3140
+ detail?: any;
3141
+ startTime?: number;
3142
+ }
3143
+ interface PerformanceMeasureOptions {
3144
+ detail?: any;
3145
+ start?: number;
3146
+ duration?: number;
3147
+ end?: number;
3148
+ }
3149
+ /**
3150
+ * 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).
3151
+ *
3152
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3153
+ */
3154
+ declare abstract class PerformanceEntry {
3155
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3156
+ get name(): string;
3157
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3158
+ get entryType(): string;
3159
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3160
+ get startTime(): number;
3161
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3162
+ get duration(): number;
3163
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3164
+ toJSON(): any;
3165
+ }
3166
+ interface EventCounts {
3167
+ get size(): number;
3168
+ get(eventType: string): number | undefined;
3169
+ has(eventType: string): boolean;
3170
+ entries(): IterableIterator<string[]>;
3171
+ keys(): IterableIterator<string>;
3172
+ values(): IterableIterator<number>;
3173
+ forEach(
3174
+ param1: (param0: number, param1: string, param2: EventCounts) => void,
3175
+ param2?: any,
3176
+ ): void;
3177
+ [Symbol.iterator](): IterableIterator<string[]>;
3178
+ }
3097
3179
  type AiImageClassificationInput = {
3098
3180
  image: number[];
3099
3181
  };
@@ -289,6 +289,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
289
289
  FixedLengthStream: typeof FixedLengthStream;
290
290
  IdentityTransformStream: typeof IdentityTransformStream;
291
291
  HTMLRewriter: typeof HTMLRewriter;
292
+ Performance: typeof Performance;
292
293
  }
293
294
  export declare function addEventListener<
294
295
  Type extends keyof WorkerGlobalScopeEventMap,
@@ -466,18 +467,6 @@ export declare abstract class Navigator {
466
467
  readonly userAgent: string;
467
468
  readonly hardwareConcurrency: number;
468
469
  }
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
- export 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
- }
481
470
  export interface AlarmInvocationInfo {
482
471
  readonly isRetry: boolean;
483
472
  readonly retryCount: number;
@@ -3105,6 +3094,99 @@ export interface SyncKvListOptions {
3105
3094
  reverse?: boolean;
3106
3095
  limit?: number;
3107
3096
  }
3097
+ /**
3098
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3099
+ * as well as timing of subrequests and other operations.
3100
+ *
3101
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3102
+ */
3103
+ export declare abstract class Performance extends EventTarget {
3104
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3105
+ get timeOrigin(): number;
3106
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3107
+ now(): number;
3108
+ get eventCounts(): EventCounts;
3109
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3110
+ clearMarks(name?: string): void;
3111
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3112
+ clearMeasures(name?: string): void;
3113
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3114
+ clearResourceTimings(): void;
3115
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3116
+ getEntries(): PerformanceEntry[];
3117
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3118
+ getEntriesByName(name: string, type: string): PerformanceEntry[];
3119
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3120
+ getEntriesByType(type: string): PerformanceEntry[];
3121
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3122
+ mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3123
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3124
+ measure(
3125
+ measureName: string,
3126
+ measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3127
+ maybeEndMark?: string,
3128
+ ): PerformanceMeasure;
3129
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3130
+ setResourceTimingBufferSize(size: number): void;
3131
+ }
3132
+ /**
3133
+ * 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.
3134
+ *
3135
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3136
+ */
3137
+ export interface PerformanceMark extends PerformanceEntry {
3138
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3139
+ get detail(): any;
3140
+ }
3141
+ /**
3142
+ * 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.
3143
+ *
3144
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3145
+ */
3146
+ export interface PerformanceMeasure extends PerformanceEntry {
3147
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3148
+ get detail(): any;
3149
+ }
3150
+ export interface PerformanceMarkOptions {
3151
+ detail?: any;
3152
+ startTime?: number;
3153
+ }
3154
+ export interface PerformanceMeasureOptions {
3155
+ detail?: any;
3156
+ start?: number;
3157
+ duration?: number;
3158
+ end?: number;
3159
+ }
3160
+ /**
3161
+ * 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).
3162
+ *
3163
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3164
+ */
3165
+ export declare abstract class PerformanceEntry {
3166
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3167
+ get name(): string;
3168
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3169
+ get entryType(): string;
3170
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3171
+ get startTime(): number;
3172
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3173
+ get duration(): number;
3174
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3175
+ toJSON(): any;
3176
+ }
3177
+ export interface EventCounts {
3178
+ get size(): number;
3179
+ get(eventType: string): number | undefined;
3180
+ has(eventType: string): boolean;
3181
+ entries(): IterableIterator<string[]>;
3182
+ keys(): IterableIterator<string>;
3183
+ values(): IterableIterator<number>;
3184
+ forEach(
3185
+ param1: (param0: number, param1: string, param2: EventCounts) => void,
3186
+ param2?: any,
3187
+ ): void;
3188
+ [Symbol.iterator](): IterableIterator<string[]>;
3189
+ }
3108
3190
  export type AiImageClassificationInput = {
3109
3191
  image: number[];
3110
3192
  };
@@ -289,6 +289,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
289
289
  FixedLengthStream: typeof FixedLengthStream;
290
290
  IdentityTransformStream: typeof IdentityTransformStream;
291
291
  HTMLRewriter: typeof HTMLRewriter;
292
+ Performance: typeof Performance;
292
293
  }
293
294
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
294
295
  type: Type,
@@ -461,18 +462,6 @@ declare abstract class Navigator {
461
462
  readonly userAgent: string;
462
463
  readonly hardwareConcurrency: number;
463
464
  }
464
- /**
465
- * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
466
- * as well as timing of subrequests and other operations.
467
- *
468
- * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
469
- */
470
- interface Performance {
471
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
472
- readonly timeOrigin: number;
473
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
474
- now(): number;
475
- }
476
465
  interface AlarmInvocationInfo {
477
466
  readonly isRetry: boolean;
478
467
  readonly retryCount: number;
@@ -3098,6 +3087,99 @@ interface SyncKvListOptions {
3098
3087
  reverse?: boolean;
3099
3088
  limit?: number;
3100
3089
  }
3090
+ /**
3091
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3092
+ * as well as timing of subrequests and other operations.
3093
+ *
3094
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3095
+ */
3096
+ declare abstract class Performance extends EventTarget {
3097
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3098
+ get timeOrigin(): number;
3099
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3100
+ now(): number;
3101
+ get eventCounts(): EventCounts;
3102
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3103
+ clearMarks(name?: string): void;
3104
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3105
+ clearMeasures(name?: string): void;
3106
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3107
+ clearResourceTimings(): void;
3108
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3109
+ getEntries(): PerformanceEntry[];
3110
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3111
+ getEntriesByName(name: string, type: string): PerformanceEntry[];
3112
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3113
+ getEntriesByType(type: string): PerformanceEntry[];
3114
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3115
+ mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3116
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3117
+ measure(
3118
+ measureName: string,
3119
+ measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3120
+ maybeEndMark?: string,
3121
+ ): PerformanceMeasure;
3122
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3123
+ setResourceTimingBufferSize(size: number): void;
3124
+ }
3125
+ /**
3126
+ * 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.
3127
+ *
3128
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3129
+ */
3130
+ interface PerformanceMark extends PerformanceEntry {
3131
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3132
+ get detail(): any;
3133
+ }
3134
+ /**
3135
+ * 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.
3136
+ *
3137
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3138
+ */
3139
+ interface PerformanceMeasure extends PerformanceEntry {
3140
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3141
+ get detail(): any;
3142
+ }
3143
+ interface PerformanceMarkOptions {
3144
+ detail?: any;
3145
+ startTime?: number;
3146
+ }
3147
+ interface PerformanceMeasureOptions {
3148
+ detail?: any;
3149
+ start?: number;
3150
+ duration?: number;
3151
+ end?: number;
3152
+ }
3153
+ /**
3154
+ * 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).
3155
+ *
3156
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3157
+ */
3158
+ declare abstract class PerformanceEntry {
3159
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3160
+ get name(): string;
3161
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3162
+ get entryType(): string;
3163
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3164
+ get startTime(): number;
3165
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3166
+ get duration(): number;
3167
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3168
+ toJSON(): any;
3169
+ }
3170
+ interface EventCounts {
3171
+ get size(): number;
3172
+ get(eventType: string): number | undefined;
3173
+ has(eventType: string): boolean;
3174
+ entries(): IterableIterator<string[]>;
3175
+ keys(): IterableIterator<string>;
3176
+ values(): IterableIterator<number>;
3177
+ forEach(
3178
+ param1: (param0: number, param1: string, param2: EventCounts) => void,
3179
+ param2?: any,
3180
+ ): void;
3181
+ [Symbol.iterator](): IterableIterator<string[]>;
3182
+ }
3101
3183
  type AiImageClassificationInput = {
3102
3184
  image: number[];
3103
3185
  };
@@ -289,6 +289,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
289
289
  FixedLengthStream: typeof FixedLengthStream;
290
290
  IdentityTransformStream: typeof IdentityTransformStream;
291
291
  HTMLRewriter: typeof HTMLRewriter;
292
+ Performance: typeof Performance;
292
293
  }
293
294
  export declare function addEventListener<
294
295
  Type extends keyof WorkerGlobalScopeEventMap,
@@ -466,18 +467,6 @@ export declare abstract class Navigator {
466
467
  readonly userAgent: string;
467
468
  readonly hardwareConcurrency: number;
468
469
  }
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
- export 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
- }
481
470
  export interface AlarmInvocationInfo {
482
471
  readonly isRetry: boolean;
483
472
  readonly retryCount: number;
@@ -3109,6 +3098,99 @@ export interface SyncKvListOptions {
3109
3098
  reverse?: boolean;
3110
3099
  limit?: number;
3111
3100
  }
3101
+ /**
3102
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3103
+ * as well as timing of subrequests and other operations.
3104
+ *
3105
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3106
+ */
3107
+ export declare abstract class Performance extends EventTarget {
3108
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3109
+ get timeOrigin(): number;
3110
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3111
+ now(): number;
3112
+ get eventCounts(): EventCounts;
3113
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3114
+ clearMarks(name?: string): void;
3115
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3116
+ clearMeasures(name?: string): void;
3117
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3118
+ clearResourceTimings(): void;
3119
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3120
+ getEntries(): PerformanceEntry[];
3121
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3122
+ getEntriesByName(name: string, type: string): PerformanceEntry[];
3123
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3124
+ getEntriesByType(type: string): PerformanceEntry[];
3125
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3126
+ mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3127
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3128
+ measure(
3129
+ measureName: string,
3130
+ measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3131
+ maybeEndMark?: string,
3132
+ ): PerformanceMeasure;
3133
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3134
+ setResourceTimingBufferSize(size: number): void;
3135
+ }
3136
+ /**
3137
+ * 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.
3138
+ *
3139
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3140
+ */
3141
+ export interface PerformanceMark extends PerformanceEntry {
3142
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3143
+ get detail(): any;
3144
+ }
3145
+ /**
3146
+ * 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.
3147
+ *
3148
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3149
+ */
3150
+ export interface PerformanceMeasure extends PerformanceEntry {
3151
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3152
+ get detail(): any;
3153
+ }
3154
+ export interface PerformanceMarkOptions {
3155
+ detail?: any;
3156
+ startTime?: number;
3157
+ }
3158
+ export interface PerformanceMeasureOptions {
3159
+ detail?: any;
3160
+ start?: number;
3161
+ duration?: number;
3162
+ end?: number;
3163
+ }
3164
+ /**
3165
+ * 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).
3166
+ *
3167
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3168
+ */
3169
+ export declare abstract class PerformanceEntry {
3170
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3171
+ get name(): string;
3172
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3173
+ get entryType(): string;
3174
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3175
+ get startTime(): number;
3176
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3177
+ get duration(): number;
3178
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3179
+ toJSON(): any;
3180
+ }
3181
+ export interface EventCounts {
3182
+ get size(): number;
3183
+ get(eventType: string): number | undefined;
3184
+ has(eventType: string): boolean;
3185
+ entries(): IterableIterator<string[]>;
3186
+ keys(): IterableIterator<string>;
3187
+ values(): IterableIterator<number>;
3188
+ forEach(
3189
+ param1: (param0: number, param1: string, param2: EventCounts) => void,
3190
+ param2?: any,
3191
+ ): void;
3192
+ [Symbol.iterator](): IterableIterator<string[]>;
3193
+ }
3112
3194
  export type AiImageClassificationInput = {
3113
3195
  image: number[];
3114
3196
  };