@cloudflare/workers-types 4.20240620.0 → 4.20240712.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 +511 -467
- package/2021-11-03/index.ts +258 -193
- package/2022-01-31/index.d.ts +511 -467
- package/2022-01-31/index.ts +258 -193
- package/2022-03-21/index.d.ts +515 -473
- package/2022-03-21/index.ts +262 -199
- package/2022-08-04/index.d.ts +515 -473
- package/2022-08-04/index.ts +262 -199
- package/2022-10-31/index.d.ts +515 -473
- package/2022-10-31/index.ts +262 -199
- package/2022-11-30/index.d.ts +510 -468
- package/2022-11-30/index.ts +262 -199
- package/2023-03-01/index.d.ts +510 -468
- package/2023-03-01/index.ts +262 -199
- package/2023-07-01/index.d.ts +510 -468
- package/2023-07-01/index.ts +262 -199
- package/experimental/index.d.ts +517 -475
- package/experimental/index.ts +262 -199
- package/index.d.ts +511 -467
- package/index.ts +258 -193
- package/oldest/index.d.ts +511 -467
- package/oldest/index.ts +258 -193
- package/package.json +1 -1
package/2022-03-21/index.ts
CHANGED
|
@@ -249,6 +249,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
249
249
|
ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
|
|
250
250
|
CountQueuingStrategy: typeof CountQueuingStrategy;
|
|
251
251
|
ErrorEvent: typeof ErrorEvent;
|
|
252
|
+
EventSource: typeof EventSource;
|
|
252
253
|
CompressionStream: typeof CompressionStream;
|
|
253
254
|
DecompressionStream: typeof DecompressionStream;
|
|
254
255
|
TextEncoderStream: typeof TextEncoderStream;
|
|
@@ -280,16 +281,16 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
280
281
|
FixedLengthStream: typeof FixedLengthStream;
|
|
281
282
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
282
283
|
HTMLRewriter: typeof HTMLRewriter;
|
|
283
|
-
GPUAdapter: typeof
|
|
284
|
-
GPUOutOfMemoryError: typeof
|
|
285
|
-
GPUValidationError: typeof
|
|
286
|
-
GPUInternalError: typeof
|
|
287
|
-
GPUDeviceLostInfo: typeof
|
|
288
|
-
GPUBufferUsage: typeof
|
|
289
|
-
GPUShaderStage: typeof
|
|
290
|
-
GPUMapMode: typeof
|
|
291
|
-
GPUTextureUsage: typeof
|
|
292
|
-
GPUColorWrite: typeof
|
|
284
|
+
GPUAdapter: typeof GPUAdapter;
|
|
285
|
+
GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
|
|
286
|
+
GPUValidationError: typeof GPUValidationError;
|
|
287
|
+
GPUInternalError: typeof GPUInternalError;
|
|
288
|
+
GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
|
|
289
|
+
GPUBufferUsage: typeof GPUBufferUsage;
|
|
290
|
+
GPUShaderStage: typeof GPUShaderStage;
|
|
291
|
+
GPUMapMode: typeof GPUMapMode;
|
|
292
|
+
GPUTextureUsage: typeof GPUTextureUsage;
|
|
293
|
+
GPUColorWrite: typeof GPUColorWrite;
|
|
293
294
|
}
|
|
294
295
|
export declare function addEventListener<
|
|
295
296
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -436,7 +437,7 @@ export declare abstract class Navigator {
|
|
|
436
437
|
| FormData,
|
|
437
438
|
): boolean;
|
|
438
439
|
readonly userAgent: string;
|
|
439
|
-
readonly gpu:
|
|
440
|
+
readonly gpu: GPU;
|
|
440
441
|
}
|
|
441
442
|
/**
|
|
442
443
|
* Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.
|
|
@@ -2525,65 +2526,61 @@ export interface SocketInfo {
|
|
|
2525
2526
|
remoteAddress?: string;
|
|
2526
2527
|
localAddress?: string;
|
|
2527
2528
|
}
|
|
2528
|
-
export interface
|
|
2529
|
-
requestAdapter(
|
|
2530
|
-
param1?: gpuGPURequestAdapterOptions,
|
|
2531
|
-
): Promise<gpuGPUAdapter | null>;
|
|
2529
|
+
export interface GPU {
|
|
2530
|
+
requestAdapter(param1?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
|
|
2532
2531
|
}
|
|
2533
|
-
export declare abstract class
|
|
2534
|
-
requestDevice(param1?:
|
|
2535
|
-
requestAdapterInfo(unmaskHints?: string[]): Promise<
|
|
2536
|
-
get features():
|
|
2537
|
-
get limits():
|
|
2532
|
+
export declare abstract class GPUAdapter {
|
|
2533
|
+
requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
2534
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
|
|
2535
|
+
get features(): GPUSupportedFeatures;
|
|
2536
|
+
get limits(): GPUSupportedLimits;
|
|
2538
2537
|
}
|
|
2539
|
-
export interface
|
|
2540
|
-
createBuffer(param1:
|
|
2538
|
+
export interface GPUDevice extends EventTarget {
|
|
2539
|
+
createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
|
|
2541
2540
|
createBindGroupLayout(
|
|
2542
|
-
descriptor:
|
|
2543
|
-
):
|
|
2544
|
-
createBindGroup(descriptor:
|
|
2545
|
-
createSampler(descriptor:
|
|
2546
|
-
createShaderModule(
|
|
2547
|
-
descriptor: gpuGPUShaderModuleDescriptor,
|
|
2548
|
-
): gpuGPUShaderModule;
|
|
2541
|
+
descriptor: GPUBindGroupLayoutDescriptor,
|
|
2542
|
+
): GPUBindGroupLayout;
|
|
2543
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
2544
|
+
createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
|
|
2545
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
2549
2546
|
createPipelineLayout(
|
|
2550
|
-
descriptor:
|
|
2551
|
-
):
|
|
2547
|
+
descriptor: GPUPipelineLayoutDescriptor,
|
|
2548
|
+
): GPUPipelineLayout;
|
|
2552
2549
|
createComputePipeline(
|
|
2553
|
-
descriptor:
|
|
2554
|
-
):
|
|
2550
|
+
descriptor: GPUComputePipelineDescriptor,
|
|
2551
|
+
): GPUComputePipeline;
|
|
2555
2552
|
createRenderPipeline(
|
|
2556
|
-
descriptor:
|
|
2557
|
-
):
|
|
2553
|
+
descriptor: GPURenderPipelineDescriptor,
|
|
2554
|
+
): GPURenderPipeline;
|
|
2558
2555
|
createCommandEncoder(
|
|
2559
|
-
descriptor?:
|
|
2560
|
-
):
|
|
2561
|
-
createTexture(param1:
|
|
2556
|
+
descriptor?: GPUCommandEncoderDescriptor,
|
|
2557
|
+
): GPUCommandEncoder;
|
|
2558
|
+
createTexture(param1: GPUTextureDescriptor): GPUTexture;
|
|
2562
2559
|
destroy(): void;
|
|
2563
|
-
createQuerySet(descriptor:
|
|
2560
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
2564
2561
|
pushErrorScope(filter: string): void;
|
|
2565
|
-
popErrorScope(): Promise<
|
|
2566
|
-
get queue():
|
|
2567
|
-
get lost(): Promise<
|
|
2568
|
-
get features():
|
|
2569
|
-
get limits():
|
|
2562
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
2563
|
+
get queue(): GPUQueue;
|
|
2564
|
+
get lost(): Promise<GPUDeviceLostInfo>;
|
|
2565
|
+
get features(): GPUSupportedFeatures;
|
|
2566
|
+
get limits(): GPUSupportedLimits;
|
|
2570
2567
|
}
|
|
2571
|
-
export interface
|
|
2568
|
+
export interface GPUDeviceDescriptor {
|
|
2572
2569
|
label?: string;
|
|
2573
2570
|
requiredFeatures?: string[];
|
|
2574
2571
|
requiredLimits?: Record<string, number | bigint>;
|
|
2575
|
-
defaultQueue?:
|
|
2572
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
2576
2573
|
}
|
|
2577
|
-
export interface
|
|
2574
|
+
export interface GPUBufferDescriptor {
|
|
2578
2575
|
label: string;
|
|
2579
2576
|
size: number | bigint;
|
|
2580
2577
|
usage: number;
|
|
2581
2578
|
mappedAtCreation: boolean;
|
|
2582
2579
|
}
|
|
2583
|
-
export interface
|
|
2580
|
+
export interface GPUQueueDescriptor {
|
|
2584
2581
|
label?: string;
|
|
2585
2582
|
}
|
|
2586
|
-
export declare abstract class
|
|
2583
|
+
export declare abstract class GPUBufferUsage {
|
|
2587
2584
|
static readonly MAP_READ: number;
|
|
2588
2585
|
static readonly MAP_WRITE: number;
|
|
2589
2586
|
static readonly COPY_SRC: number;
|
|
@@ -2595,7 +2592,7 @@ export declare abstract class gpuGPUBufferUsage {
|
|
|
2595
2592
|
static readonly INDIRECT: number;
|
|
2596
2593
|
static readonly QUERY_RESOLVE: number;
|
|
2597
2594
|
}
|
|
2598
|
-
export interface
|
|
2595
|
+
export interface GPUBuffer {
|
|
2599
2596
|
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2600
2597
|
unmap(): void;
|
|
2601
2598
|
destroy(): void;
|
|
@@ -2608,59 +2605,59 @@ export interface gpuGPUBuffer {
|
|
|
2608
2605
|
get usage(): number;
|
|
2609
2606
|
get mapState(): string;
|
|
2610
2607
|
}
|
|
2611
|
-
export declare abstract class
|
|
2608
|
+
export declare abstract class GPUShaderStage {
|
|
2612
2609
|
static readonly VERTEX: number;
|
|
2613
2610
|
static readonly FRAGMENT: number;
|
|
2614
2611
|
static readonly COMPUTE: number;
|
|
2615
2612
|
}
|
|
2616
|
-
export interface
|
|
2613
|
+
export interface GPUBindGroupLayoutDescriptor {
|
|
2617
2614
|
label?: string;
|
|
2618
|
-
entries:
|
|
2615
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
2619
2616
|
}
|
|
2620
|
-
export interface
|
|
2617
|
+
export interface GPUBindGroupLayoutEntry {
|
|
2621
2618
|
binding: number;
|
|
2622
2619
|
visibility: number;
|
|
2623
|
-
buffer?:
|
|
2624
|
-
sampler?:
|
|
2625
|
-
texture?:
|
|
2626
|
-
storageTexture?:
|
|
2620
|
+
buffer?: GPUBufferBindingLayout;
|
|
2621
|
+
sampler?: GPUSamplerBindingLayout;
|
|
2622
|
+
texture?: GPUTextureBindingLayout;
|
|
2623
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
2627
2624
|
}
|
|
2628
|
-
export interface
|
|
2625
|
+
export interface GPUStorageTextureBindingLayout {
|
|
2629
2626
|
access?: string;
|
|
2630
2627
|
format: string;
|
|
2631
2628
|
viewDimension?: string;
|
|
2632
2629
|
}
|
|
2633
|
-
export interface
|
|
2630
|
+
export interface GPUTextureBindingLayout {
|
|
2634
2631
|
sampleType?: string;
|
|
2635
2632
|
viewDimension?: string;
|
|
2636
2633
|
multisampled?: boolean;
|
|
2637
2634
|
}
|
|
2638
|
-
export interface
|
|
2635
|
+
export interface GPUSamplerBindingLayout {
|
|
2639
2636
|
type?: string;
|
|
2640
2637
|
}
|
|
2641
|
-
export interface
|
|
2638
|
+
export interface GPUBufferBindingLayout {
|
|
2642
2639
|
type?: string;
|
|
2643
2640
|
hasDynamicOffset?: boolean;
|
|
2644
2641
|
minBindingSize?: number | bigint;
|
|
2645
2642
|
}
|
|
2646
|
-
export interface
|
|
2647
|
-
export interface
|
|
2648
|
-
export interface
|
|
2643
|
+
export interface GPUBindGroupLayout {}
|
|
2644
|
+
export interface GPUBindGroup {}
|
|
2645
|
+
export interface GPUBindGroupDescriptor {
|
|
2649
2646
|
label?: string;
|
|
2650
|
-
layout:
|
|
2651
|
-
entries:
|
|
2647
|
+
layout: GPUBindGroupLayout;
|
|
2648
|
+
entries: GPUBindGroupEntry[];
|
|
2652
2649
|
}
|
|
2653
|
-
export interface
|
|
2650
|
+
export interface GPUBindGroupEntry {
|
|
2654
2651
|
binding: number;
|
|
2655
|
-
resource:
|
|
2652
|
+
resource: GPUBufferBinding | GPUSampler;
|
|
2656
2653
|
}
|
|
2657
|
-
export interface
|
|
2658
|
-
buffer:
|
|
2654
|
+
export interface GPUBufferBinding {
|
|
2655
|
+
buffer: GPUBuffer;
|
|
2659
2656
|
offset?: number | bigint;
|
|
2660
2657
|
size?: number | bigint;
|
|
2661
2658
|
}
|
|
2662
|
-
export interface
|
|
2663
|
-
export interface
|
|
2659
|
+
export interface GPUSampler {}
|
|
2660
|
+
export interface GPUSamplerDescriptor {
|
|
2664
2661
|
label?: string;
|
|
2665
2662
|
addressModeU?: string;
|
|
2666
2663
|
addressModeV?: string;
|
|
@@ -2673,76 +2670,74 @@ export interface gpuGPUSamplerDescriptor {
|
|
|
2673
2670
|
compare: string;
|
|
2674
2671
|
maxAnisotropy?: number;
|
|
2675
2672
|
}
|
|
2676
|
-
export interface
|
|
2677
|
-
getCompilationInfo(): Promise<
|
|
2673
|
+
export interface GPUShaderModule {
|
|
2674
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
2678
2675
|
}
|
|
2679
|
-
export interface
|
|
2676
|
+
export interface GPUShaderModuleDescriptor {
|
|
2680
2677
|
label?: string;
|
|
2681
2678
|
code: string;
|
|
2682
2679
|
}
|
|
2683
|
-
export interface
|
|
2684
|
-
export interface
|
|
2680
|
+
export interface GPUPipelineLayout {}
|
|
2681
|
+
export interface GPUPipelineLayoutDescriptor {
|
|
2685
2682
|
label?: string;
|
|
2686
|
-
bindGroupLayouts:
|
|
2683
|
+
bindGroupLayouts: GPUBindGroupLayout[];
|
|
2687
2684
|
}
|
|
2688
|
-
export interface
|
|
2689
|
-
getBindGroupLayout(index: number):
|
|
2685
|
+
export interface GPUComputePipeline {
|
|
2686
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
2690
2687
|
}
|
|
2691
|
-
export interface
|
|
2688
|
+
export interface GPUComputePipelineDescriptor {
|
|
2692
2689
|
label?: string;
|
|
2693
|
-
compute:
|
|
2694
|
-
layout: string |
|
|
2690
|
+
compute: GPUProgrammableStage;
|
|
2691
|
+
layout: string | GPUPipelineLayout;
|
|
2695
2692
|
}
|
|
2696
|
-
export interface
|
|
2697
|
-
module:
|
|
2693
|
+
export interface GPUProgrammableStage {
|
|
2694
|
+
module: GPUShaderModule;
|
|
2698
2695
|
entryPoint: string;
|
|
2699
2696
|
constants?: Record<string, number>;
|
|
2700
2697
|
}
|
|
2701
|
-
export interface
|
|
2698
|
+
export interface GPUCommandEncoder {
|
|
2702
2699
|
get label(): string;
|
|
2703
2700
|
beginComputePass(
|
|
2704
|
-
descriptor?:
|
|
2705
|
-
):
|
|
2706
|
-
beginRenderPass(
|
|
2707
|
-
descriptor: gpuGPURenderPassDescriptor,
|
|
2708
|
-
): gpuGPURenderPassEncoder;
|
|
2701
|
+
descriptor?: GPUComputePassDescriptor,
|
|
2702
|
+
): GPUComputePassEncoder;
|
|
2703
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
2709
2704
|
copyBufferToBuffer(
|
|
2710
|
-
source:
|
|
2705
|
+
source: GPUBuffer,
|
|
2711
2706
|
sourceOffset: number | bigint,
|
|
2712
|
-
destination:
|
|
2707
|
+
destination: GPUBuffer,
|
|
2713
2708
|
destinationOffset: number | bigint,
|
|
2714
2709
|
size: number | bigint,
|
|
2715
2710
|
): void;
|
|
2716
|
-
finish(param0?:
|
|
2711
|
+
finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
2717
2712
|
copyTextureToBuffer(
|
|
2718
|
-
source:
|
|
2719
|
-
destination:
|
|
2720
|
-
copySize: Iterable<number> |
|
|
2713
|
+
source: GPUImageCopyTexture,
|
|
2714
|
+
destination: GPUImageCopyBuffer,
|
|
2715
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2721
2716
|
): void;
|
|
2722
2717
|
copyBufferToTexture(
|
|
2723
|
-
source:
|
|
2724
|
-
destination:
|
|
2725
|
-
copySize: Iterable<number> |
|
|
2718
|
+
source: GPUImageCopyBuffer,
|
|
2719
|
+
destination: GPUImageCopyTexture,
|
|
2720
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2726
2721
|
): void;
|
|
2727
2722
|
copyTextureToTexture(
|
|
2728
|
-
source:
|
|
2729
|
-
destination:
|
|
2730
|
-
copySize: Iterable<number> |
|
|
2723
|
+
source: GPUImageCopyTexture,
|
|
2724
|
+
destination: GPUImageCopyTexture,
|
|
2725
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2731
2726
|
): void;
|
|
2732
2727
|
clearBuffer(
|
|
2733
|
-
buffer:
|
|
2728
|
+
buffer: GPUBuffer,
|
|
2734
2729
|
offset?: number | bigint,
|
|
2735
2730
|
size?: number | bigint,
|
|
2736
2731
|
): void;
|
|
2737
2732
|
}
|
|
2738
|
-
export interface
|
|
2733
|
+
export interface GPUCommandEncoderDescriptor {
|
|
2739
2734
|
label?: string;
|
|
2740
2735
|
}
|
|
2741
|
-
export interface
|
|
2742
|
-
setPipeline(pipeline:
|
|
2736
|
+
export interface GPUComputePassEncoder {
|
|
2737
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
2743
2738
|
setBindGroup(
|
|
2744
2739
|
index: number,
|
|
2745
|
-
bindGroup:
|
|
2740
|
+
bindGroup: GPUBindGroup | null,
|
|
2746
2741
|
dynamicOffsets?: Iterable<number>,
|
|
2747
2742
|
): void;
|
|
2748
2743
|
dispatchWorkgroups(
|
|
@@ -2752,52 +2747,52 @@ export interface gpuGPUComputePassEncoder {
|
|
|
2752
2747
|
): void;
|
|
2753
2748
|
end(): void;
|
|
2754
2749
|
}
|
|
2755
|
-
export interface
|
|
2750
|
+
export interface GPUComputePassDescriptor {
|
|
2756
2751
|
label?: string;
|
|
2757
|
-
timestampWrites?:
|
|
2752
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
2758
2753
|
}
|
|
2759
|
-
export interface
|
|
2760
|
-
export interface
|
|
2754
|
+
export interface GPUQuerySet {}
|
|
2755
|
+
export interface GPUQuerySetDescriptor {
|
|
2761
2756
|
label?: string;
|
|
2762
2757
|
}
|
|
2763
|
-
export interface
|
|
2764
|
-
querySet:
|
|
2758
|
+
export interface GPUComputePassTimestampWrites {
|
|
2759
|
+
querySet: GPUQuerySet;
|
|
2765
2760
|
beginningOfPassWriteIndex?: number;
|
|
2766
2761
|
endOfPassWriteIndex?: number;
|
|
2767
2762
|
}
|
|
2768
|
-
export interface
|
|
2763
|
+
export interface GPUCommandBufferDescriptor {
|
|
2769
2764
|
label?: string;
|
|
2770
2765
|
}
|
|
2771
|
-
export interface
|
|
2772
|
-
export interface
|
|
2773
|
-
submit(commandBuffers:
|
|
2766
|
+
export interface GPUCommandBuffer {}
|
|
2767
|
+
export interface GPUQueue {
|
|
2768
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
2774
2769
|
writeBuffer(
|
|
2775
|
-
buffer:
|
|
2770
|
+
buffer: GPUBuffer,
|
|
2776
2771
|
bufferOffset: number | bigint,
|
|
2777
2772
|
data: ArrayBuffer | ArrayBufferView,
|
|
2778
2773
|
dataOffset?: number | bigint,
|
|
2779
2774
|
size?: number | bigint,
|
|
2780
2775
|
): void;
|
|
2781
2776
|
}
|
|
2782
|
-
export declare abstract class
|
|
2777
|
+
export declare abstract class GPUMapMode {
|
|
2783
2778
|
static readonly READ: number;
|
|
2784
2779
|
static readonly WRITE: number;
|
|
2785
2780
|
}
|
|
2786
|
-
export interface
|
|
2781
|
+
export interface GPURequestAdapterOptions {
|
|
2787
2782
|
powerPreference: string;
|
|
2788
2783
|
forceFallbackAdapter?: boolean;
|
|
2789
2784
|
}
|
|
2790
|
-
export interface
|
|
2785
|
+
export interface GPUAdapterInfo {
|
|
2791
2786
|
get vendor(): string;
|
|
2792
2787
|
get architecture(): string;
|
|
2793
2788
|
get device(): string;
|
|
2794
2789
|
get description(): string;
|
|
2795
2790
|
}
|
|
2796
|
-
export interface
|
|
2791
|
+
export interface GPUSupportedFeatures {
|
|
2797
2792
|
has(name: string): boolean;
|
|
2798
2793
|
keys(): string[];
|
|
2799
2794
|
}
|
|
2800
|
-
export interface
|
|
2795
|
+
export interface GPUSupportedLimits {
|
|
2801
2796
|
get maxTextureDimension1D(): number;
|
|
2802
2797
|
get maxTextureDimension2D(): number;
|
|
2803
2798
|
get maxTextureDimension3D(): number;
|
|
@@ -2830,17 +2825,17 @@ export interface gpuGPUSupportedLimits {
|
|
|
2830
2825
|
get maxComputeWorkgroupSizeZ(): number;
|
|
2831
2826
|
get maxComputeWorkgroupsPerDimension(): number;
|
|
2832
2827
|
}
|
|
2833
|
-
export declare abstract class
|
|
2828
|
+
export declare abstract class GPUError {
|
|
2834
2829
|
get message(): string;
|
|
2835
2830
|
}
|
|
2836
|
-
export declare abstract class
|
|
2837
|
-
export declare abstract class
|
|
2838
|
-
export declare abstract class
|
|
2839
|
-
export declare abstract class
|
|
2831
|
+
export declare abstract class GPUOutOfMemoryError extends GPUError {}
|
|
2832
|
+
export declare abstract class GPUInternalError extends GPUError {}
|
|
2833
|
+
export declare abstract class GPUValidationError extends GPUError {}
|
|
2834
|
+
export declare abstract class GPUDeviceLostInfo {
|
|
2840
2835
|
get message(): string;
|
|
2841
2836
|
get reason(): string;
|
|
2842
2837
|
}
|
|
2843
|
-
export interface
|
|
2838
|
+
export interface GPUCompilationMessage {
|
|
2844
2839
|
get message(): string;
|
|
2845
2840
|
get type(): string;
|
|
2846
2841
|
get lineNum(): number;
|
|
@@ -2848,19 +2843,19 @@ export interface gpuGPUCompilationMessage {
|
|
|
2848
2843
|
get offset(): number;
|
|
2849
2844
|
get length(): number;
|
|
2850
2845
|
}
|
|
2851
|
-
export interface
|
|
2852
|
-
get messages():
|
|
2846
|
+
export interface GPUCompilationInfo {
|
|
2847
|
+
get messages(): GPUCompilationMessage[];
|
|
2853
2848
|
}
|
|
2854
|
-
export declare abstract class
|
|
2849
|
+
export declare abstract class GPUTextureUsage {
|
|
2855
2850
|
static readonly COPY_SRC: number;
|
|
2856
2851
|
static readonly COPY_DST: number;
|
|
2857
2852
|
static readonly TEXTURE_BINDING: number;
|
|
2858
2853
|
static readonly STORAGE_BINDING: number;
|
|
2859
2854
|
static readonly RENDER_ATTACHMENT: number;
|
|
2860
2855
|
}
|
|
2861
|
-
export interface
|
|
2856
|
+
export interface GPUTextureDescriptor {
|
|
2862
2857
|
label: string;
|
|
2863
|
-
size: number[] |
|
|
2858
|
+
size: number[] | GPUExtent3DDict;
|
|
2864
2859
|
mipLevelCount?: number;
|
|
2865
2860
|
sampleCount?: number;
|
|
2866
2861
|
dimension?: string;
|
|
@@ -2868,13 +2863,13 @@ export interface gpuGPUTextureDescriptor {
|
|
|
2868
2863
|
usage: number;
|
|
2869
2864
|
viewFormats?: string[];
|
|
2870
2865
|
}
|
|
2871
|
-
export interface
|
|
2866
|
+
export interface GPUExtent3DDict {
|
|
2872
2867
|
width: number;
|
|
2873
2868
|
height?: number;
|
|
2874
2869
|
depthOrArrayLayers?: number;
|
|
2875
2870
|
}
|
|
2876
|
-
export interface
|
|
2877
|
-
createView(descriptor?:
|
|
2871
|
+
export interface GPUTexture {
|
|
2872
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
2878
2873
|
destroy(): void;
|
|
2879
2874
|
get width(): number;
|
|
2880
2875
|
get height(): number;
|
|
@@ -2884,8 +2879,8 @@ export interface gpuGPUTexture {
|
|
|
2884
2879
|
get format(): string;
|
|
2885
2880
|
get usage(): number;
|
|
2886
2881
|
}
|
|
2887
|
-
export interface
|
|
2888
|
-
export interface
|
|
2882
|
+
export interface GPUTextureView {}
|
|
2883
|
+
export interface GPUTextureViewDescriptor {
|
|
2889
2884
|
label: string;
|
|
2890
2885
|
format: string;
|
|
2891
2886
|
dimension: string;
|
|
@@ -2895,91 +2890,91 @@ export interface gpuGPUTextureViewDescriptor {
|
|
|
2895
2890
|
baseArrayLayer?: number;
|
|
2896
2891
|
arrayLayerCount: number;
|
|
2897
2892
|
}
|
|
2898
|
-
export declare abstract class
|
|
2893
|
+
export declare abstract class GPUColorWrite {
|
|
2899
2894
|
static readonly RED: number;
|
|
2900
2895
|
static readonly GREEN: number;
|
|
2901
2896
|
static readonly BLUE: number;
|
|
2902
2897
|
static readonly ALPHA: number;
|
|
2903
2898
|
static readonly ALL: number;
|
|
2904
2899
|
}
|
|
2905
|
-
export interface
|
|
2906
|
-
export interface
|
|
2900
|
+
export interface GPURenderPipeline {}
|
|
2901
|
+
export interface GPURenderPipelineDescriptor {
|
|
2907
2902
|
label?: string;
|
|
2908
|
-
layout: string |
|
|
2909
|
-
vertex:
|
|
2910
|
-
primitive?:
|
|
2911
|
-
depthStencil?:
|
|
2912
|
-
multisample?:
|
|
2913
|
-
fragment?:
|
|
2914
|
-
}
|
|
2915
|
-
export interface
|
|
2916
|
-
module:
|
|
2903
|
+
layout: string | GPUPipelineLayout;
|
|
2904
|
+
vertex: GPUVertexState;
|
|
2905
|
+
primitive?: GPUPrimitiveState;
|
|
2906
|
+
depthStencil?: GPUDepthStencilState;
|
|
2907
|
+
multisample?: GPUMultisampleState;
|
|
2908
|
+
fragment?: GPUFragmentState;
|
|
2909
|
+
}
|
|
2910
|
+
export interface GPUVertexState {
|
|
2911
|
+
module: GPUShaderModule;
|
|
2917
2912
|
entryPoint: string;
|
|
2918
2913
|
constants?: Record<string, number>;
|
|
2919
|
-
buffers?:
|
|
2914
|
+
buffers?: GPUVertexBufferLayout[];
|
|
2920
2915
|
}
|
|
2921
|
-
export interface
|
|
2916
|
+
export interface GPUVertexBufferLayout {
|
|
2922
2917
|
arrayStride: number | bigint;
|
|
2923
2918
|
stepMode?: string;
|
|
2924
|
-
attributes:
|
|
2919
|
+
attributes: GPUVertexAttribute[];
|
|
2925
2920
|
}
|
|
2926
|
-
export interface
|
|
2921
|
+
export interface GPUVertexAttribute {
|
|
2927
2922
|
format: string;
|
|
2928
2923
|
offset: number | bigint;
|
|
2929
2924
|
shaderLocation: number;
|
|
2930
2925
|
}
|
|
2931
|
-
export interface
|
|
2926
|
+
export interface GPUPrimitiveState {
|
|
2932
2927
|
topology?: string;
|
|
2933
2928
|
stripIndexFormat?: string;
|
|
2934
2929
|
frontFace?: string;
|
|
2935
2930
|
cullMode?: string;
|
|
2936
2931
|
unclippedDepth?: boolean;
|
|
2937
2932
|
}
|
|
2938
|
-
export interface
|
|
2933
|
+
export interface GPUStencilFaceState {
|
|
2939
2934
|
compare?: string;
|
|
2940
2935
|
failOp?: string;
|
|
2941
2936
|
depthFailOp?: string;
|
|
2942
2937
|
passOp?: string;
|
|
2943
2938
|
}
|
|
2944
|
-
export interface
|
|
2939
|
+
export interface GPUDepthStencilState {
|
|
2945
2940
|
format: string;
|
|
2946
2941
|
depthWriteEnabled: boolean;
|
|
2947
2942
|
depthCompare: string;
|
|
2948
|
-
stencilFront?:
|
|
2949
|
-
stencilBack?:
|
|
2943
|
+
stencilFront?: GPUStencilFaceState;
|
|
2944
|
+
stencilBack?: GPUStencilFaceState;
|
|
2950
2945
|
stencilReadMask?: number;
|
|
2951
2946
|
stencilWriteMask?: number;
|
|
2952
2947
|
depthBias?: number;
|
|
2953
2948
|
depthBiasSlopeScale?: number;
|
|
2954
2949
|
depthBiasClamp?: number;
|
|
2955
2950
|
}
|
|
2956
|
-
export interface
|
|
2951
|
+
export interface GPUMultisampleState {
|
|
2957
2952
|
count?: number;
|
|
2958
2953
|
mask?: number;
|
|
2959
2954
|
alphaToCoverageEnabled?: boolean;
|
|
2960
2955
|
}
|
|
2961
|
-
export interface
|
|
2962
|
-
module:
|
|
2956
|
+
export interface GPUFragmentState {
|
|
2957
|
+
module: GPUShaderModule;
|
|
2963
2958
|
entryPoint: string;
|
|
2964
2959
|
constants?: Record<string, number>;
|
|
2965
|
-
targets:
|
|
2960
|
+
targets: GPUColorTargetState[];
|
|
2966
2961
|
}
|
|
2967
|
-
export interface
|
|
2962
|
+
export interface GPUColorTargetState {
|
|
2968
2963
|
format: string;
|
|
2969
|
-
blend:
|
|
2964
|
+
blend: GPUBlendState;
|
|
2970
2965
|
writeMask?: number;
|
|
2971
2966
|
}
|
|
2972
|
-
export interface
|
|
2973
|
-
color:
|
|
2974
|
-
alpha:
|
|
2967
|
+
export interface GPUBlendState {
|
|
2968
|
+
color: GPUBlendComponent;
|
|
2969
|
+
alpha: GPUBlendComponent;
|
|
2975
2970
|
}
|
|
2976
|
-
export interface
|
|
2971
|
+
export interface GPUBlendComponent {
|
|
2977
2972
|
operation?: string;
|
|
2978
2973
|
srcFactor?: string;
|
|
2979
2974
|
dstFactor?: string;
|
|
2980
2975
|
}
|
|
2981
|
-
export interface
|
|
2982
|
-
setPipeline(pipeline:
|
|
2976
|
+
export interface GPURenderPassEncoder {
|
|
2977
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
2983
2978
|
draw(
|
|
2984
2979
|
vertexCount: number,
|
|
2985
2980
|
instanceCount?: number,
|
|
@@ -2988,30 +2983,30 @@ export interface gpuGPURenderPassEncoder {
|
|
|
2988
2983
|
): void;
|
|
2989
2984
|
end(): void;
|
|
2990
2985
|
}
|
|
2991
|
-
export interface
|
|
2986
|
+
export interface GPURenderPassDescriptor {
|
|
2992
2987
|
label?: string;
|
|
2993
|
-
colorAttachments:
|
|
2994
|
-
depthStencilAttachment?:
|
|
2995
|
-
occlusionQuerySet?:
|
|
2996
|
-
timestampWrites?:
|
|
2988
|
+
colorAttachments: GPURenderPassColorAttachment[];
|
|
2989
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
2990
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
2991
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
2997
2992
|
maxDrawCount?: number | bigint;
|
|
2998
2993
|
}
|
|
2999
|
-
export interface
|
|
3000
|
-
view:
|
|
2994
|
+
export interface GPURenderPassColorAttachment {
|
|
2995
|
+
view: GPUTextureView;
|
|
3001
2996
|
depthSlice?: number;
|
|
3002
|
-
resolveTarget?:
|
|
3003
|
-
clearValue?: number[] |
|
|
2997
|
+
resolveTarget?: GPUTextureView;
|
|
2998
|
+
clearValue?: number[] | GPUColorDict;
|
|
3004
2999
|
loadOp: string;
|
|
3005
3000
|
storeOp: string;
|
|
3006
3001
|
}
|
|
3007
|
-
export interface
|
|
3002
|
+
export interface GPUColorDict {
|
|
3008
3003
|
r: number;
|
|
3009
3004
|
g: number;
|
|
3010
3005
|
b: number;
|
|
3011
3006
|
a: number;
|
|
3012
3007
|
}
|
|
3013
|
-
export interface
|
|
3014
|
-
view:
|
|
3008
|
+
export interface GPURenderPassDepthStencilAttachment {
|
|
3009
|
+
view: GPUTextureView;
|
|
3015
3010
|
depthClearValue?: number;
|
|
3016
3011
|
depthLoadOp?: string;
|
|
3017
3012
|
depthStoreOp?: string;
|
|
@@ -3021,28 +3016,75 @@ export interface gpuGPURenderPassDepthStencilAttachment {
|
|
|
3021
3016
|
stencilStoreOp?: string;
|
|
3022
3017
|
stencilReadOnly?: boolean;
|
|
3023
3018
|
}
|
|
3024
|
-
export interface
|
|
3025
|
-
querySet:
|
|
3019
|
+
export interface GPURenderPassTimestampWrites {
|
|
3020
|
+
querySet: GPUQuerySet;
|
|
3026
3021
|
beginningOfPassWriteIndex?: number;
|
|
3027
3022
|
endOfPassWriteIndex?: number;
|
|
3028
3023
|
}
|
|
3029
|
-
export interface
|
|
3030
|
-
texture:
|
|
3024
|
+
export interface GPUImageCopyTexture {
|
|
3025
|
+
texture: GPUTexture;
|
|
3031
3026
|
mipLevel?: number;
|
|
3032
|
-
origin?: number[] |
|
|
3027
|
+
origin?: number[] | GPUOrigin3DDict;
|
|
3033
3028
|
aspect?: string;
|
|
3034
3029
|
}
|
|
3035
|
-
export interface
|
|
3036
|
-
buffer:
|
|
3030
|
+
export interface GPUImageCopyBuffer {
|
|
3031
|
+
buffer: GPUBuffer;
|
|
3037
3032
|
offset?: number | bigint;
|
|
3038
3033
|
bytesPerRow?: number;
|
|
3039
3034
|
rowsPerImage?: number;
|
|
3040
3035
|
}
|
|
3041
|
-
export interface
|
|
3036
|
+
export interface GPUOrigin3DDict {
|
|
3042
3037
|
x?: number;
|
|
3043
3038
|
y?: number;
|
|
3044
3039
|
z?: number;
|
|
3045
3040
|
}
|
|
3041
|
+
export declare class EventSource {
|
|
3042
|
+
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3043
|
+
/**
|
|
3044
|
+
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
3045
|
+
*
|
|
3046
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3047
|
+
*/
|
|
3048
|
+
close(): void;
|
|
3049
|
+
/**
|
|
3050
|
+
* Returns the URL providing the event stream.
|
|
3051
|
+
*
|
|
3052
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3053
|
+
*/
|
|
3054
|
+
get url(): string;
|
|
3055
|
+
/**
|
|
3056
|
+
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
3057
|
+
*
|
|
3058
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3059
|
+
*/
|
|
3060
|
+
get withCredentials(): boolean;
|
|
3061
|
+
/**
|
|
3062
|
+
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
3063
|
+
*
|
|
3064
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3065
|
+
*/
|
|
3066
|
+
get readyState(): number;
|
|
3067
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3068
|
+
get onopen(): any | null;
|
|
3069
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3070
|
+
set onopen(value: any | null);
|
|
3071
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3072
|
+
get onmessage(): any | null;
|
|
3073
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3074
|
+
set onmessage(value: any | null);
|
|
3075
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3076
|
+
get onerror(): any | null;
|
|
3077
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3078
|
+
set onerror(value: any | null);
|
|
3079
|
+
static readonly CONNECTING: number;
|
|
3080
|
+
static readonly OPEN: number;
|
|
3081
|
+
static readonly CLOSED: number;
|
|
3082
|
+
static from(stream: ReadableStream): EventSource;
|
|
3083
|
+
}
|
|
3084
|
+
export interface EventSourceEventSourceInit {
|
|
3085
|
+
withCredentials?: boolean;
|
|
3086
|
+
fetcher?: Fetcher;
|
|
3087
|
+
}
|
|
3046
3088
|
export type AiImageClassificationInput = {
|
|
3047
3089
|
image: number[];
|
|
3048
3090
|
};
|
|
@@ -4037,7 +4079,7 @@ export interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
|
|
|
4037
4079
|
certNotAfter: "";
|
|
4038
4080
|
}
|
|
4039
4081
|
/** Possible outcomes of TLS verification */
|
|
4040
|
-
export type CertVerificationStatus =
|
|
4082
|
+
export declare type CertVerificationStatus =
|
|
4041
4083
|
/** Authentication succeeded */
|
|
4042
4084
|
| "SUCCESS"
|
|
4043
4085
|
/** No certificate was presented */
|
|
@@ -4055,7 +4097,7 @@ export type CertVerificationStatus =
|
|
|
4055
4097
|
/**
|
|
4056
4098
|
* An upstream endpoint's response to a TCP `keepalive` message from Cloudflare.
|
|
4057
4099
|
*/
|
|
4058
|
-
export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4100
|
+
export declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4059
4101
|
| 0 /** Unknown */
|
|
4060
4102
|
| 1 /** no keepalives (not found) */
|
|
4061
4103
|
| 2 /** no connection re-use, opening keepalive connection failed */
|
|
@@ -4063,7 +4105,7 @@ export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
|
4063
4105
|
| 4 /** connection re-use, refused by the origin server (`TCP FIN`) */
|
|
4064
4106
|
| 5; /** connection re-use, accepted by the origin server */
|
|
4065
4107
|
/** ISO 3166-1 Alpha-2 codes */
|
|
4066
|
-
export type Iso3166Alpha2Code =
|
|
4108
|
+
export declare type Iso3166Alpha2Code =
|
|
4067
4109
|
| "AD"
|
|
4068
4110
|
| "AE"
|
|
4069
4111
|
| "AF"
|
|
@@ -4314,7 +4356,14 @@ export type Iso3166Alpha2Code =
|
|
|
4314
4356
|
| "ZM"
|
|
4315
4357
|
| "ZW";
|
|
4316
4358
|
/** The 2-letter continent codes Cloudflare uses */
|
|
4317
|
-
export type ContinentCode =
|
|
4359
|
+
export declare type ContinentCode =
|
|
4360
|
+
| "AF"
|
|
4361
|
+
| "AN"
|
|
4362
|
+
| "AS"
|
|
4363
|
+
| "EU"
|
|
4364
|
+
| "NA"
|
|
4365
|
+
| "OC"
|
|
4366
|
+
| "SA";
|
|
4318
4367
|
export type CfProperties<HostMetadata = unknown> =
|
|
4319
4368
|
| IncomingRequestCfProperties<HostMetadata>
|
|
4320
4369
|
| RequestInitCfProperties;
|
|
@@ -4415,7 +4464,7 @@ export interface SendEmail {
|
|
|
4415
4464
|
export declare abstract class EmailEvent extends ExtendableEvent {
|
|
4416
4465
|
readonly message: ForwardableEmailMessage;
|
|
4417
4466
|
}
|
|
4418
|
-
export type EmailExportedHandler<Env = unknown> = (
|
|
4467
|
+
export declare type EmailExportedHandler<Env = unknown> = (
|
|
4419
4468
|
message: ForwardableEmailMessage,
|
|
4420
4469
|
env: Env,
|
|
4421
4470
|
ctx: ExecutionContext,
|
|
@@ -4544,6 +4593,20 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
|
|
|
4544
4593
|
// Key Identifier of the JWK
|
|
4545
4594
|
readonly kid: string;
|
|
4546
4595
|
}
|
|
4596
|
+
export interface RateLimitOptions {
|
|
4597
|
+
key: string;
|
|
4598
|
+
}
|
|
4599
|
+
export interface RateLimitOutcome {
|
|
4600
|
+
success: boolean;
|
|
4601
|
+
}
|
|
4602
|
+
export interface RateLimit {
|
|
4603
|
+
/**
|
|
4604
|
+
* Rate limit a request based on the provided options.
|
|
4605
|
+
* @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
4606
|
+
* @returns A promise that resolves with the outcome of the rate limit.
|
|
4607
|
+
*/
|
|
4608
|
+
limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
|
|
4609
|
+
}
|
|
4547
4610
|
// Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
|
|
4548
4611
|
// to referenced by `Fetcher`. This is included in the "importable" version of the types which
|
|
4549
4612
|
// strips all `module` blocks.
|