1declare namespace InternalWorkerBinding { 2 class Worker { 3 constructor( 4 url: string | URL | null, 5 env: object | null | undefined, 6 execArgv: string[] | null | undefined, 7 resourceLimits: Float64Array, 8 trackUnmanagedFds: boolean, 9 ); 10 startThread(): void; 11 stopThread(): void; 12 ref(): void; 13 unref(): void; 14 getResourceLimits(): Float64Array; 15 takeHeapSnapshot(): object; 16 loopIdleTime(): number; 17 loopStartTime(): number; 18 } 19} 20 21declare function InternalBinding(binding: 'worker'): { 22 Worker: typeof InternalWorkerBinding.Worker; 23 getEnvMessagePort(): InternalMessagingBinding.MessagePort; 24 threadId: number; 25 isMainThread: boolean; 26 ownsProcessState: boolean; 27 resourceLimits?: Float64Array; 28 kMaxYoungGenerationSizeMb: number; 29 kMaxOldGenerationSizeMb: number; 30 kCodeRangeSizeMb: number; 31 kStackSizeMb: number; 32 kTotalResourceLimitCount: number; 33}; 34