@cloudflare/workers-types 4.20250913.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/latest/index.d.ts CHANGED
@@ -296,13 +296,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
296
296
  FixedLengthStream: typeof FixedLengthStream;
297
297
  IdentityTransformStream: typeof IdentityTransformStream;
298
298
  HTMLRewriter: typeof HTMLRewriter;
299
- Performance: typeof Performance;
300
- PerformanceEntry: typeof PerformanceEntry;
301
- PerformanceMark: typeof PerformanceMark;
302
- PerformanceMeasure: typeof PerformanceMeasure;
303
- PerformanceResourceTiming: typeof PerformanceResourceTiming;
304
- PerformanceObserver: typeof PerformanceObserver;
305
- PerformanceObserverEntryList: typeof PerformanceObserverEntryList;
306
299
  }
307
300
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
308
301
  type: Type,
@@ -477,6 +470,18 @@ declare abstract class Navigator {
477
470
  readonly language: string;
478
471
  readonly languages: string[];
479
472
  }
473
+ /**
474
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
475
+ * as well as timing of subrequests and other operations.
476
+ *
477
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
478
+ */
479
+ interface Performance {
480
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
481
+ readonly timeOrigin: number;
482
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
483
+ now(): number;
484
+ }
480
485
  interface AlarmInvocationInfo {
481
486
  readonly isRetry: boolean;
482
487
  readonly retryCount: number;
@@ -3190,171 +3195,6 @@ interface WorkerLoaderWorkerCode {
3190
3195
  tails?: Fetcher[];
3191
3196
  streamingTails?: Fetcher[];
3192
3197
  }
3193
- /**
3194
- * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3195
- * as well as timing of subrequests and other operations.
3196
- *
3197
- * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3198
- */
3199
- declare abstract class Performance extends EventTarget {
3200
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3201
- get timeOrigin(): number;
3202
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3203
- now(): number;
3204
- get eventCounts(): EventCounts;
3205
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3206
- clearMarks(name?: string): void;
3207
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3208
- clearMeasures(name?: string): void;
3209
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3210
- clearResourceTimings(): void;
3211
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3212
- getEntries(): PerformanceEntry[];
3213
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3214
- getEntriesByName(name: string, type?: string): PerformanceEntry[];
3215
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3216
- getEntriesByType(type: string): PerformanceEntry[];
3217
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3218
- mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3219
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3220
- measure(
3221
- measureName: string,
3222
- measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3223
- maybeEndMark?: string,
3224
- ): PerformanceMeasure;
3225
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3226
- setResourceTimingBufferSize(size: number): void;
3227
- }
3228
- /**
3229
- * 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.
3230
- *
3231
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3232
- */
3233
- declare class PerformanceMark extends PerformanceEntry {
3234
- constructor(name: string, maybeOptions?: PerformanceMarkOptions);
3235
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3236
- get detail(): any | undefined;
3237
- toJSON(): any;
3238
- }
3239
- /**
3240
- * 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.
3241
- *
3242
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3243
- */
3244
- declare abstract class PerformanceMeasure extends PerformanceEntry {
3245
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3246
- get detail(): any | undefined;
3247
- toJSON(): any;
3248
- }
3249
- interface PerformanceMarkOptions {
3250
- detail?: any;
3251
- startTime?: number;
3252
- }
3253
- interface PerformanceMeasureOptions {
3254
- detail?: any;
3255
- start?: number;
3256
- duration?: number;
3257
- end?: number;
3258
- }
3259
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList) */
3260
- declare abstract class PerformanceObserverEntryList {
3261
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries) */
3262
- getEntries(): PerformanceEntry[];
3263
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType) */
3264
- getEntriesByType(type: string): PerformanceEntry[];
3265
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName) */
3266
- getEntriesByName(name: string, type?: string): PerformanceEntry[];
3267
- }
3268
- /**
3269
- * 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).
3270
- *
3271
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3272
- */
3273
- declare abstract class PerformanceEntry {
3274
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3275
- get name(): string;
3276
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3277
- get entryType(): string;
3278
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3279
- get startTime(): number;
3280
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3281
- get duration(): number;
3282
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3283
- toJSON(): any;
3284
- }
3285
- /**
3286
- * Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script.
3287
- *
3288
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
3289
- */
3290
- declare abstract class PerformanceResourceTiming extends PerformanceEntry {
3291
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd) */
3292
- get connectEnd(): number;
3293
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart) */
3294
- get connectStart(): number;
3295
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize) */
3296
- get decodedBodySize(): number;
3297
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd) */
3298
- get domainLookupEnd(): number;
3299
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart) */
3300
- get domainLookupStart(): number;
3301
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize) */
3302
- get encodedBodySize(): number;
3303
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart) */
3304
- get fetchStart(): number;
3305
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType) */
3306
- get initiatorType(): string;
3307
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol) */
3308
- get nextHopProtocol(): string;
3309
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd) */
3310
- get redirectEnd(): number;
3311
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart) */
3312
- get redirectStart(): number;
3313
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart) */
3314
- get requestStart(): number;
3315
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd) */
3316
- get responseEnd(): number;
3317
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */
3318
- get responseStart(): number;
3319
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */
3320
- get responseStatus(): number;
3321
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */
3322
- get secureConnectionStart(): number | undefined;
3323
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */
3324
- get transferSize(): number;
3325
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart) */
3326
- get workerStart(): number;
3327
- }
3328
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver) */
3329
- declare class PerformanceObserver {
3330
- constructor(callback: any);
3331
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect) */
3332
- disconnect(): void;
3333
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe) */
3334
- observe(options?: PerformanceObserverObserveOptions): void;
3335
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords) */
3336
- takeRecords(): PerformanceEntry[];
3337
- readonly supportedEntryTypes: string[];
3338
- }
3339
- interface PerformanceObserverObserveOptions {
3340
- buffered?: boolean;
3341
- durationThreshold?: number;
3342
- entryTypes?: string[];
3343
- type?: string;
3344
- }
3345
- interface EventCounts {
3346
- get size(): number;
3347
- get(eventType: string): number | undefined;
3348
- has(eventType: string): boolean;
3349
- entries(): IterableIterator<string[]>;
3350
- keys(): IterableIterator<string>;
3351
- values(): IterableIterator<number>;
3352
- forEach(
3353
- param1: (param0: number, param1: string, param2: EventCounts) => void,
3354
- param2?: any,
3355
- ): void;
3356
- [Symbol.iterator](): IterableIterator<string[]>;
3357
- }
3358
3198
  type AiImageClassificationInput = {
3359
3199
  image: number[];
3360
3200
  };
package/latest/index.ts CHANGED
@@ -296,13 +296,6 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
296
296
  FixedLengthStream: typeof FixedLengthStream;
297
297
  IdentityTransformStream: typeof IdentityTransformStream;
298
298
  HTMLRewriter: typeof HTMLRewriter;
299
- Performance: typeof Performance;
300
- PerformanceEntry: typeof PerformanceEntry;
301
- PerformanceMark: typeof PerformanceMark;
302
- PerformanceMeasure: typeof PerformanceMeasure;
303
- PerformanceResourceTiming: typeof PerformanceResourceTiming;
304
- PerformanceObserver: typeof PerformanceObserver;
305
- PerformanceObserverEntryList: typeof PerformanceObserverEntryList;
306
299
  }
307
300
  export declare function addEventListener<
308
301
  Type extends keyof WorkerGlobalScopeEventMap,
@@ -482,6 +475,18 @@ export declare abstract class Navigator {
482
475
  readonly language: string;
483
476
  readonly languages: string[];
484
477
  }
478
+ /**
479
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
480
+ * as well as timing of subrequests and other operations.
481
+ *
482
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
483
+ */
484
+ export interface Performance {
485
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
486
+ readonly timeOrigin: number;
487
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
488
+ now(): number;
489
+ }
485
490
  export interface AlarmInvocationInfo {
486
491
  readonly isRetry: boolean;
487
492
  readonly retryCount: number;
@@ -3201,171 +3206,6 @@ export interface WorkerLoaderWorkerCode {
3201
3206
  tails?: Fetcher[];
3202
3207
  streamingTails?: Fetcher[];
3203
3208
  }
3204
- /**
3205
- * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3206
- * as well as timing of subrequests and other operations.
3207
- *
3208
- * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3209
- */
3210
- export declare abstract class Performance extends EventTarget {
3211
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3212
- get timeOrigin(): number;
3213
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3214
- now(): number;
3215
- get eventCounts(): EventCounts;
3216
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
3217
- clearMarks(name?: string): void;
3218
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
3219
- clearMeasures(name?: string): void;
3220
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
3221
- clearResourceTimings(): void;
3222
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
3223
- getEntries(): PerformanceEntry[];
3224
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
3225
- getEntriesByName(name: string, type?: string): PerformanceEntry[];
3226
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
3227
- getEntriesByType(type: string): PerformanceEntry[];
3228
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
3229
- mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
3230
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
3231
- measure(
3232
- measureName: string,
3233
- measureOptionsOrStartMark: PerformanceMeasureOptions | string,
3234
- maybeEndMark?: string,
3235
- ): PerformanceMeasure;
3236
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
3237
- setResourceTimingBufferSize(size: number): void;
3238
- }
3239
- /**
3240
- * 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.
3241
- *
3242
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
3243
- */
3244
- export declare class PerformanceMark extends PerformanceEntry {
3245
- constructor(name: string, maybeOptions?: PerformanceMarkOptions);
3246
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
3247
- get detail(): any | undefined;
3248
- toJSON(): any;
3249
- }
3250
- /**
3251
- * 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.
3252
- *
3253
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
3254
- */
3255
- export declare abstract class PerformanceMeasure extends PerformanceEntry {
3256
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
3257
- get detail(): any | undefined;
3258
- toJSON(): any;
3259
- }
3260
- export interface PerformanceMarkOptions {
3261
- detail?: any;
3262
- startTime?: number;
3263
- }
3264
- export interface PerformanceMeasureOptions {
3265
- detail?: any;
3266
- start?: number;
3267
- duration?: number;
3268
- end?: number;
3269
- }
3270
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList) */
3271
- export declare abstract class PerformanceObserverEntryList {
3272
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries) */
3273
- getEntries(): PerformanceEntry[];
3274
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType) */
3275
- getEntriesByType(type: string): PerformanceEntry[];
3276
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName) */
3277
- getEntriesByName(name: string, type?: string): PerformanceEntry[];
3278
- }
3279
- /**
3280
- * 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).
3281
- *
3282
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
3283
- */
3284
- export declare abstract class PerformanceEntry {
3285
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
3286
- get name(): string;
3287
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
3288
- get entryType(): string;
3289
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
3290
- get startTime(): number;
3291
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
3292
- get duration(): number;
3293
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
3294
- toJSON(): any;
3295
- }
3296
- /**
3297
- * Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script.
3298
- *
3299
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
3300
- */
3301
- export declare abstract class PerformanceResourceTiming extends PerformanceEntry {
3302
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd) */
3303
- get connectEnd(): number;
3304
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart) */
3305
- get connectStart(): number;
3306
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize) */
3307
- get decodedBodySize(): number;
3308
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd) */
3309
- get domainLookupEnd(): number;
3310
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart) */
3311
- get domainLookupStart(): number;
3312
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize) */
3313
- get encodedBodySize(): number;
3314
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart) */
3315
- get fetchStart(): number;
3316
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType) */
3317
- get initiatorType(): string;
3318
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol) */
3319
- get nextHopProtocol(): string;
3320
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd) */
3321
- get redirectEnd(): number;
3322
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart) */
3323
- get redirectStart(): number;
3324
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart) */
3325
- get requestStart(): number;
3326
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd) */
3327
- get responseEnd(): number;
3328
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */
3329
- get responseStart(): number;
3330
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStatus) */
3331
- get responseStatus(): number;
3332
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */
3333
- get secureConnectionStart(): number | undefined;
3334
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */
3335
- get transferSize(): number;
3336
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart) */
3337
- get workerStart(): number;
3338
- }
3339
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver) */
3340
- export declare class PerformanceObserver {
3341
- constructor(callback: any);
3342
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect) */
3343
- disconnect(): void;
3344
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe) */
3345
- observe(options?: PerformanceObserverObserveOptions): void;
3346
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords) */
3347
- takeRecords(): PerformanceEntry[];
3348
- readonly supportedEntryTypes: string[];
3349
- }
3350
- export interface PerformanceObserverObserveOptions {
3351
- buffered?: boolean;
3352
- durationThreshold?: number;
3353
- entryTypes?: string[];
3354
- type?: string;
3355
- }
3356
- export interface EventCounts {
3357
- get size(): number;
3358
- get(eventType: string): number | undefined;
3359
- has(eventType: string): boolean;
3360
- entries(): IterableIterator<string[]>;
3361
- keys(): IterableIterator<string>;
3362
- values(): IterableIterator<number>;
3363
- forEach(
3364
- param1: (param0: number, param1: string, param2: EventCounts) => void,
3365
- param2?: any,
3366
- ): void;
3367
- [Symbol.iterator](): IterableIterator<string[]>;
3368
- }
3369
3209
  export type AiImageClassificationInput = {
3370
3210
  image: number[];
3371
3211
  };
package/oldest/index.d.ts CHANGED
@@ -287,7 +287,6 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
287
287
  FixedLengthStream: typeof FixedLengthStream;
288
288
  IdentityTransformStream: typeof IdentityTransformStream;
289
289
  HTMLRewriter: typeof HTMLRewriter;
290
- Performance: typeof Performance;
291
290
  }
292
291
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
293
292
  type: Type,
@@ -444,6 +443,18 @@ declare abstract class PromiseRejectionEvent extends Event {
444
443
  /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
445
444
  readonly reason: any;
446
445
  }
446
+ /**
447
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
448
+ * as well as timing of subrequests and other operations.
449
+ *
450
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
451
+ */
452
+ interface Performance {
453
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
454
+ readonly timeOrigin: number;
455
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
456
+ now(): number;
457
+ }
447
458
  interface AlarmInvocationInfo {
448
459
  readonly isRetry: boolean;
449
460
  readonly retryCount: number;
@@ -3099,18 +3110,6 @@ interface WorkerLoaderWorkerCode {
3099
3110
  tails?: Fetcher[];
3100
3111
  streamingTails?: Fetcher[];
3101
3112
  }
3102
- /**
3103
- * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3104
- * as well as timing of subrequests and other operations.
3105
- *
3106
- * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3107
- */
3108
- declare abstract class Performance {
3109
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3110
- get timeOrigin(): number;
3111
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3112
- now(): number;
3113
- }
3114
3113
  type AiImageClassificationInput = {
3115
3114
  image: number[];
3116
3115
  };
package/oldest/index.ts CHANGED
@@ -287,7 +287,6 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
287
287
  FixedLengthStream: typeof FixedLengthStream;
288
288
  IdentityTransformStream: typeof IdentityTransformStream;
289
289
  HTMLRewriter: typeof HTMLRewriter;
290
- Performance: typeof Performance;
291
290
  }
292
291
  export declare function addEventListener<
293
292
  Type extends keyof WorkerGlobalScopeEventMap,
@@ -449,6 +448,18 @@ export declare abstract class PromiseRejectionEvent extends Event {
449
448
  /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
450
449
  readonly reason: any;
451
450
  }
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
+ }
452
463
  export interface AlarmInvocationInfo {
453
464
  readonly isRetry: boolean;
454
465
  readonly retryCount: number;
@@ -3110,18 +3121,6 @@ export interface WorkerLoaderWorkerCode {
3110
3121
  tails?: Fetcher[];
3111
3122
  streamingTails?: Fetcher[];
3112
3123
  }
3113
- /**
3114
- * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3115
- * as well as timing of subrequests and other operations.
3116
- *
3117
- * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
3118
- */
3119
- export declare abstract class Performance {
3120
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
3121
- get timeOrigin(): number;
3122
- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3123
- now(): number;
3124
- }
3125
3124
  export type AiImageClassificationInput = {
3126
3125
  image: number[];
3127
3126
  };
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20250913.0"
10
+ "version": "4.20250917.0"
11
11
  }