@workers-community/workers-types 4.20260413.1 → 4.20260415.1

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.
Files changed (3) hide show
  1. package/index.d.ts +6 -0
  2. package/index.ts +6 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -3930,6 +3930,7 @@ interface WorkerStub {
3930
3930
  }
3931
3931
  interface WorkerStubEntrypointOptions {
3932
3932
  props?: any;
3933
+ limits?: workerdResourceLimits;
3933
3934
  }
3934
3935
  interface WorkerLoader {
3935
3936
  get(
@@ -3951,6 +3952,7 @@ interface WorkerLoaderWorkerCode {
3951
3952
  compatibilityDate: string;
3952
3953
  compatibilityFlags?: string[];
3953
3954
  allowExperimental?: boolean;
3955
+ limits?: workerdResourceLimits;
3954
3956
  mainModule: string;
3955
3957
  modules: Record<string, WorkerLoaderModule | string>;
3956
3958
  env?: any;
@@ -3958,6 +3960,10 @@ interface WorkerLoaderWorkerCode {
3958
3960
  tails?: Fetcher[];
3959
3961
  streamingTails?: Fetcher[];
3960
3962
  }
3963
+ interface workerdResourceLimits {
3964
+ cpuMs?: number;
3965
+ subRequests?: number;
3966
+ }
3961
3967
  /**
3962
3968
  * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3963
3969
  * as well as timing of subrequests and other operations.
package/index.ts CHANGED
@@ -3936,6 +3936,7 @@ export interface WorkerStub {
3936
3936
  }
3937
3937
  export interface WorkerStubEntrypointOptions {
3938
3938
  props?: any;
3939
+ limits?: workerdResourceLimits;
3939
3940
  }
3940
3941
  export interface WorkerLoader {
3941
3942
  get(
@@ -3957,6 +3958,7 @@ export interface WorkerLoaderWorkerCode {
3957
3958
  compatibilityDate: string;
3958
3959
  compatibilityFlags?: string[];
3959
3960
  allowExperimental?: boolean;
3961
+ limits?: workerdResourceLimits;
3960
3962
  mainModule: string;
3961
3963
  modules: Record<string, WorkerLoaderModule | string>;
3962
3964
  env?: any;
@@ -3964,6 +3966,10 @@ export interface WorkerLoaderWorkerCode {
3964
3966
  tails?: Fetcher[];
3965
3967
  streamingTails?: Fetcher[];
3966
3968
  }
3969
+ export interface workerdResourceLimits {
3970
+ cpuMs?: number;
3971
+ subRequests?: number;
3972
+ }
3967
3973
  /**
3968
3974
  * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
3969
3975
  * as well as timing of subrequests and other operations.
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "author": "Workers Community",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20260413.1",
10
+ "version": "4.20260415.1",
11
11
  "exports": {
12
12
  ".": {
13
13
  "types": "./index.d.ts",