@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/2021-11-03/index.d.ts
CHANGED
|
@@ -287,6 +287,7 @@ 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
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
292
293
|
type: Type,
|
|
@@ -443,18 +444,6 @@ declare abstract class PromiseRejectionEvent extends Event {
|
|
|
443
444
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
444
445
|
readonly reason: any;
|
|
445
446
|
}
|
|
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
|
-
}
|
|
458
447
|
interface AlarmInvocationInfo {
|
|
459
448
|
readonly isRetry: boolean;
|
|
460
449
|
readonly retryCount: number;
|
|
@@ -3049,6 +3038,99 @@ interface SyncKvListOptions {
|
|
|
3049
3038
|
reverse?: boolean;
|
|
3050
3039
|
limit?: number;
|
|
3051
3040
|
}
|
|
3041
|
+
/**
|
|
3042
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3043
|
+
* as well as timing of subrequests and other operations.
|
|
3044
|
+
*
|
|
3045
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3046
|
+
*/
|
|
3047
|
+
declare abstract class Performance extends EventTarget {
|
|
3048
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3049
|
+
get timeOrigin(): number;
|
|
3050
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3051
|
+
now(): number;
|
|
3052
|
+
get eventCounts(): EventCounts;
|
|
3053
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
|
|
3054
|
+
clearMarks(name?: string): void;
|
|
3055
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
|
|
3056
|
+
clearMeasures(name?: string): void;
|
|
3057
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
|
|
3058
|
+
clearResourceTimings(): void;
|
|
3059
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
|
|
3060
|
+
getEntries(): PerformanceEntry[];
|
|
3061
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
|
|
3062
|
+
getEntriesByName(name: string, type: string): PerformanceEntry[];
|
|
3063
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
|
|
3064
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3065
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
|
|
3066
|
+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3067
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
|
|
3068
|
+
measure(
|
|
3069
|
+
measureName: string,
|
|
3070
|
+
measureOptionsOrStartMark: PerformanceMeasureOptions | string,
|
|
3071
|
+
maybeEndMark?: string,
|
|
3072
|
+
): PerformanceMeasure;
|
|
3073
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
|
|
3074
|
+
setResourceTimingBufferSize(size: number): void;
|
|
3075
|
+
}
|
|
3076
|
+
/**
|
|
3077
|
+
* 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.
|
|
3078
|
+
*
|
|
3079
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3080
|
+
*/
|
|
3081
|
+
interface PerformanceMark extends PerformanceEntry {
|
|
3082
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
|
|
3083
|
+
get detail(): any;
|
|
3084
|
+
}
|
|
3085
|
+
/**
|
|
3086
|
+
* 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.
|
|
3087
|
+
*
|
|
3088
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3089
|
+
*/
|
|
3090
|
+
interface PerformanceMeasure extends PerformanceEntry {
|
|
3091
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
|
|
3092
|
+
get detail(): any;
|
|
3093
|
+
}
|
|
3094
|
+
interface PerformanceMarkOptions {
|
|
3095
|
+
detail?: any;
|
|
3096
|
+
startTime?: number;
|
|
3097
|
+
}
|
|
3098
|
+
interface PerformanceMeasureOptions {
|
|
3099
|
+
detail?: any;
|
|
3100
|
+
start?: number;
|
|
3101
|
+
duration?: number;
|
|
3102
|
+
end?: number;
|
|
3103
|
+
}
|
|
3104
|
+
/**
|
|
3105
|
+
* 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).
|
|
3106
|
+
*
|
|
3107
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
3108
|
+
*/
|
|
3109
|
+
declare abstract class PerformanceEntry {
|
|
3110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
|
|
3111
|
+
get name(): string;
|
|
3112
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
|
|
3113
|
+
get entryType(): string;
|
|
3114
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
|
|
3115
|
+
get startTime(): number;
|
|
3116
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
|
|
3117
|
+
get duration(): number;
|
|
3118
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
|
|
3119
|
+
toJSON(): any;
|
|
3120
|
+
}
|
|
3121
|
+
interface EventCounts {
|
|
3122
|
+
get size(): number;
|
|
3123
|
+
get(eventType: string): number | undefined;
|
|
3124
|
+
has(eventType: string): boolean;
|
|
3125
|
+
entries(): IterableIterator<string[]>;
|
|
3126
|
+
keys(): IterableIterator<string>;
|
|
3127
|
+
values(): IterableIterator<number>;
|
|
3128
|
+
forEach(
|
|
3129
|
+
param1: (param0: number, param1: string, param2: EventCounts) => void,
|
|
3130
|
+
param2?: any,
|
|
3131
|
+
): void;
|
|
3132
|
+
[Symbol.iterator](): IterableIterator<string[]>;
|
|
3133
|
+
}
|
|
3052
3134
|
type AiImageClassificationInput = {
|
|
3053
3135
|
image: number[];
|
|
3054
3136
|
};
|
package/2021-11-03/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/2022-01-31/index.d.ts
CHANGED
|
@@ -287,6 +287,7 @@ 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
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
292
293
|
type: Type,
|
|
@@ -443,18 +444,6 @@ declare abstract class PromiseRejectionEvent extends Event {
|
|
|
443
444
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
444
445
|
readonly reason: any;
|
|
445
446
|
}
|
|
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
|
-
}
|
|
458
447
|
interface AlarmInvocationInfo {
|
|
459
448
|
readonly isRetry: boolean;
|
|
460
449
|
readonly retryCount: number;
|
|
@@ -3075,6 +3064,99 @@ interface SyncKvListOptions {
|
|
|
3075
3064
|
reverse?: boolean;
|
|
3076
3065
|
limit?: number;
|
|
3077
3066
|
}
|
|
3067
|
+
/**
|
|
3068
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3069
|
+
* as well as timing of subrequests and other operations.
|
|
3070
|
+
*
|
|
3071
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3072
|
+
*/
|
|
3073
|
+
declare abstract class Performance extends EventTarget {
|
|
3074
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3075
|
+
get timeOrigin(): number;
|
|
3076
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3077
|
+
now(): number;
|
|
3078
|
+
get eventCounts(): EventCounts;
|
|
3079
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
|
|
3080
|
+
clearMarks(name?: string): void;
|
|
3081
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
|
|
3082
|
+
clearMeasures(name?: string): void;
|
|
3083
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
|
|
3084
|
+
clearResourceTimings(): void;
|
|
3085
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
|
|
3086
|
+
getEntries(): PerformanceEntry[];
|
|
3087
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
|
|
3088
|
+
getEntriesByName(name: string, type: string): PerformanceEntry[];
|
|
3089
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
|
|
3090
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3091
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
|
|
3092
|
+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3093
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
|
|
3094
|
+
measure(
|
|
3095
|
+
measureName: string,
|
|
3096
|
+
measureOptionsOrStartMark: PerformanceMeasureOptions | string,
|
|
3097
|
+
maybeEndMark?: string,
|
|
3098
|
+
): PerformanceMeasure;
|
|
3099
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
|
|
3100
|
+
setResourceTimingBufferSize(size: number): void;
|
|
3101
|
+
}
|
|
3102
|
+
/**
|
|
3103
|
+
* 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.
|
|
3104
|
+
*
|
|
3105
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3106
|
+
*/
|
|
3107
|
+
interface PerformanceMark extends PerformanceEntry {
|
|
3108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
|
|
3109
|
+
get detail(): any;
|
|
3110
|
+
}
|
|
3111
|
+
/**
|
|
3112
|
+
* 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.
|
|
3113
|
+
*
|
|
3114
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3115
|
+
*/
|
|
3116
|
+
interface PerformanceMeasure extends PerformanceEntry {
|
|
3117
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
|
|
3118
|
+
get detail(): any;
|
|
3119
|
+
}
|
|
3120
|
+
interface PerformanceMarkOptions {
|
|
3121
|
+
detail?: any;
|
|
3122
|
+
startTime?: number;
|
|
3123
|
+
}
|
|
3124
|
+
interface PerformanceMeasureOptions {
|
|
3125
|
+
detail?: any;
|
|
3126
|
+
start?: number;
|
|
3127
|
+
duration?: number;
|
|
3128
|
+
end?: number;
|
|
3129
|
+
}
|
|
3130
|
+
/**
|
|
3131
|
+
* 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).
|
|
3132
|
+
*
|
|
3133
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
3134
|
+
*/
|
|
3135
|
+
declare abstract class PerformanceEntry {
|
|
3136
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
|
|
3137
|
+
get name(): string;
|
|
3138
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
|
|
3139
|
+
get entryType(): string;
|
|
3140
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
|
|
3141
|
+
get startTime(): number;
|
|
3142
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
|
|
3143
|
+
get duration(): number;
|
|
3144
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
|
|
3145
|
+
toJSON(): any;
|
|
3146
|
+
}
|
|
3147
|
+
interface EventCounts {
|
|
3148
|
+
get size(): number;
|
|
3149
|
+
get(eventType: string): number | undefined;
|
|
3150
|
+
has(eventType: string): boolean;
|
|
3151
|
+
entries(): IterableIterator<string[]>;
|
|
3152
|
+
keys(): IterableIterator<string>;
|
|
3153
|
+
values(): IterableIterator<number>;
|
|
3154
|
+
forEach(
|
|
3155
|
+
param1: (param0: number, param1: string, param2: EventCounts) => void,
|
|
3156
|
+
param2?: any,
|
|
3157
|
+
): void;
|
|
3158
|
+
[Symbol.iterator](): IterableIterator<string[]>;
|
|
3159
|
+
}
|
|
3078
3160
|
type AiImageClassificationInput = {
|
|
3079
3161
|
image: number[];
|
|
3080
3162
|
};
|
package/2022-01-31/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;
|
|
@@ -3086,6 +3075,99 @@ export interface SyncKvListOptions {
|
|
|
3086
3075
|
reverse?: boolean;
|
|
3087
3076
|
limit?: number;
|
|
3088
3077
|
}
|
|
3078
|
+
/**
|
|
3079
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3080
|
+
* as well as timing of subrequests and other operations.
|
|
3081
|
+
*
|
|
3082
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3083
|
+
*/
|
|
3084
|
+
export declare abstract class Performance extends EventTarget {
|
|
3085
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3086
|
+
get timeOrigin(): number;
|
|
3087
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3088
|
+
now(): number;
|
|
3089
|
+
get eventCounts(): EventCounts;
|
|
3090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
|
|
3091
|
+
clearMarks(name?: string): void;
|
|
3092
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
|
|
3093
|
+
clearMeasures(name?: string): void;
|
|
3094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
|
|
3095
|
+
clearResourceTimings(): void;
|
|
3096
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
|
|
3097
|
+
getEntries(): PerformanceEntry[];
|
|
3098
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
|
|
3099
|
+
getEntriesByName(name: string, type: string): PerformanceEntry[];
|
|
3100
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
|
|
3101
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3102
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
|
|
3103
|
+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3104
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
|
|
3105
|
+
measure(
|
|
3106
|
+
measureName: string,
|
|
3107
|
+
measureOptionsOrStartMark: PerformanceMeasureOptions | string,
|
|
3108
|
+
maybeEndMark?: string,
|
|
3109
|
+
): PerformanceMeasure;
|
|
3110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
|
|
3111
|
+
setResourceTimingBufferSize(size: number): void;
|
|
3112
|
+
}
|
|
3113
|
+
/**
|
|
3114
|
+
* 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.
|
|
3115
|
+
*
|
|
3116
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3117
|
+
*/
|
|
3118
|
+
export interface PerformanceMark extends PerformanceEntry {
|
|
3119
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
|
|
3120
|
+
get detail(): any;
|
|
3121
|
+
}
|
|
3122
|
+
/**
|
|
3123
|
+
* 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.
|
|
3124
|
+
*
|
|
3125
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3126
|
+
*/
|
|
3127
|
+
export interface PerformanceMeasure extends PerformanceEntry {
|
|
3128
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
|
|
3129
|
+
get detail(): any;
|
|
3130
|
+
}
|
|
3131
|
+
export interface PerformanceMarkOptions {
|
|
3132
|
+
detail?: any;
|
|
3133
|
+
startTime?: number;
|
|
3134
|
+
}
|
|
3135
|
+
export interface PerformanceMeasureOptions {
|
|
3136
|
+
detail?: any;
|
|
3137
|
+
start?: number;
|
|
3138
|
+
duration?: number;
|
|
3139
|
+
end?: number;
|
|
3140
|
+
}
|
|
3141
|
+
/**
|
|
3142
|
+
* 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).
|
|
3143
|
+
*
|
|
3144
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
3145
|
+
*/
|
|
3146
|
+
export declare abstract class PerformanceEntry {
|
|
3147
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
|
|
3148
|
+
get name(): string;
|
|
3149
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
|
|
3150
|
+
get entryType(): string;
|
|
3151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
|
|
3152
|
+
get startTime(): number;
|
|
3153
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
|
|
3154
|
+
get duration(): number;
|
|
3155
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
|
|
3156
|
+
toJSON(): any;
|
|
3157
|
+
}
|
|
3158
|
+
export interface EventCounts {
|
|
3159
|
+
get size(): number;
|
|
3160
|
+
get(eventType: string): number | undefined;
|
|
3161
|
+
has(eventType: string): boolean;
|
|
3162
|
+
entries(): IterableIterator<string[]>;
|
|
3163
|
+
keys(): IterableIterator<string>;
|
|
3164
|
+
values(): IterableIterator<number>;
|
|
3165
|
+
forEach(
|
|
3166
|
+
param1: (param0: number, param1: string, param2: EventCounts) => void,
|
|
3167
|
+
param2?: any,
|
|
3168
|
+
): void;
|
|
3169
|
+
[Symbol.iterator](): IterableIterator<string[]>;
|
|
3170
|
+
}
|
|
3089
3171
|
export type AiImageClassificationInput = {
|
|
3090
3172
|
image: number[];
|
|
3091
3173
|
};
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -3093,6 +3082,99 @@ interface SyncKvListOptions {
|
|
|
3093
3082
|
reverse?: boolean;
|
|
3094
3083
|
limit?: number;
|
|
3095
3084
|
}
|
|
3085
|
+
/**
|
|
3086
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3087
|
+
* as well as timing of subrequests and other operations.
|
|
3088
|
+
*
|
|
3089
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3090
|
+
*/
|
|
3091
|
+
declare abstract class Performance extends EventTarget {
|
|
3092
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3093
|
+
get timeOrigin(): number;
|
|
3094
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3095
|
+
now(): number;
|
|
3096
|
+
get eventCounts(): EventCounts;
|
|
3097
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
|
|
3098
|
+
clearMarks(name?: string): void;
|
|
3099
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
|
|
3100
|
+
clearMeasures(name?: string): void;
|
|
3101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
|
|
3102
|
+
clearResourceTimings(): void;
|
|
3103
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
|
|
3104
|
+
getEntries(): PerformanceEntry[];
|
|
3105
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
|
|
3106
|
+
getEntriesByName(name: string, type: string): PerformanceEntry[];
|
|
3107
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
|
|
3108
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3109
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
|
|
3110
|
+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3111
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
|
|
3112
|
+
measure(
|
|
3113
|
+
measureName: string,
|
|
3114
|
+
measureOptionsOrStartMark: PerformanceMeasureOptions | string,
|
|
3115
|
+
maybeEndMark?: string,
|
|
3116
|
+
): PerformanceMeasure;
|
|
3117
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
|
|
3118
|
+
setResourceTimingBufferSize(size: number): void;
|
|
3119
|
+
}
|
|
3120
|
+
/**
|
|
3121
|
+
* 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.
|
|
3122
|
+
*
|
|
3123
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3124
|
+
*/
|
|
3125
|
+
interface PerformanceMark extends PerformanceEntry {
|
|
3126
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
|
|
3127
|
+
get detail(): any;
|
|
3128
|
+
}
|
|
3129
|
+
/**
|
|
3130
|
+
* 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.
|
|
3131
|
+
*
|
|
3132
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3133
|
+
*/
|
|
3134
|
+
interface PerformanceMeasure extends PerformanceEntry {
|
|
3135
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
|
|
3136
|
+
get detail(): any;
|
|
3137
|
+
}
|
|
3138
|
+
interface PerformanceMarkOptions {
|
|
3139
|
+
detail?: any;
|
|
3140
|
+
startTime?: number;
|
|
3141
|
+
}
|
|
3142
|
+
interface PerformanceMeasureOptions {
|
|
3143
|
+
detail?: any;
|
|
3144
|
+
start?: number;
|
|
3145
|
+
duration?: number;
|
|
3146
|
+
end?: number;
|
|
3147
|
+
}
|
|
3148
|
+
/**
|
|
3149
|
+
* 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).
|
|
3150
|
+
*
|
|
3151
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
3152
|
+
*/
|
|
3153
|
+
declare abstract class PerformanceEntry {
|
|
3154
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
|
|
3155
|
+
get name(): string;
|
|
3156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
|
|
3157
|
+
get entryType(): string;
|
|
3158
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
|
|
3159
|
+
get startTime(): number;
|
|
3160
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
|
|
3161
|
+
get duration(): number;
|
|
3162
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
|
|
3163
|
+
toJSON(): any;
|
|
3164
|
+
}
|
|
3165
|
+
interface EventCounts {
|
|
3166
|
+
get size(): number;
|
|
3167
|
+
get(eventType: string): number | undefined;
|
|
3168
|
+
has(eventType: string): boolean;
|
|
3169
|
+
entries(): IterableIterator<string[]>;
|
|
3170
|
+
keys(): IterableIterator<string>;
|
|
3171
|
+
values(): IterableIterator<number>;
|
|
3172
|
+
forEach(
|
|
3173
|
+
param1: (param0: number, param1: string, param2: EventCounts) => void,
|
|
3174
|
+
param2?: any,
|
|
3175
|
+
): void;
|
|
3176
|
+
[Symbol.iterator](): IterableIterator<string[]>;
|
|
3177
|
+
}
|
|
3096
3178
|
type AiImageClassificationInput = {
|
|
3097
3179
|
image: number[];
|
|
3098
3180
|
};
|