File tree 3 files changed +66
-0
lines changed
3 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 4
4
"files" : [
5
5
" ./typings/internalBinding/fs.d.ts" ,
6
6
" ./typings/internalBinding/http_parser.d.ts" ,
7
+ " ./typings/internalBinding/messaging.d.ts" ,
7
8
" ./typings/internalBinding/options.d.ts" ,
8
9
" ./typings/internalBinding/serdes.d.ts" ,
9
10
" ./typings/internalBinding/util.d.ts" ,
11
+ " ./typings/internalBinding/worker.d.ts" ,
10
12
" ./typings/internalBinding.d.ts" ,
11
13
" ./typings/primordials.d.ts"
12
14
],
Original file line number Diff line number Diff line change
1
+ declare namespace InternalMessagingBinding {
2
+ class MessageChannel {
3
+ port1 : MessagePort ;
4
+ port2 : MessagePort ;
5
+ }
6
+
7
+ class MessagePort {
8
+ private constructor ( ) ;
9
+ postMessage ( message : any , transfer ?: any [ ] | null ) : void ;
10
+ start ( ) : void ;
11
+ close ( ) : void ;
12
+ ref ( ) : void ;
13
+ unref ( ) : void ;
14
+ }
15
+
16
+ class JSTransferable { }
17
+ }
18
+
19
+
20
+ declare function InternalBinding ( binding : 'messaging' ) : {
21
+ DOMException : typeof import ( 'internal/per_context/domexception' ) . DOMException ;
22
+ MessageChannel : typeof InternalMessagingBinding . MessageChannel ;
23
+ MessagePort : typeof InternalMessagingBinding . MessagePort ;
24
+ JSTransferable : typeof InternalMessagingBinding . JSTransferable ;
25
+ stopMessagePort ( port : typeof InternalMessagingBinding . MessagePort ) : void ;
26
+ checkMessagePort ( port : unknown ) : boolean ;
27
+ drainMessagePort ( port : typeof InternalMessagingBinding . MessagePort ) : void ;
28
+ receiveMessageOnPort ( port : typeof InternalMessagingBinding . MessagePort ) : any ;
29
+ moveMessagePortToContext ( port : typeof InternalMessagingBinding . MessagePort , context : any ) : typeof InternalMessagingBinding . MessagePort ;
30
+ setDeserializerCreateObjectFunction ( func : ( deserializeInfo : string ) => any ) : void ;
31
+ broadcastChannel ( name : string ) : typeof InternalMessagingBinding . MessagePort ;
32
+ } ;
Original file line number Diff line number Diff line change
1
+ declare 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
+ startThread ( ) : void ;
10
+ stopThread ( ) : void ;
11
+ ref ( ) : void ;
12
+ unref ( ) : void ;
13
+ getResourceLimits ( ) : Float64Array ;
14
+ takeHeapSnapshot ( ) : object ;
15
+ loopIdleTime ( ) : number ;
16
+ loopStartTime ( ) : number ;
17
+ }
18
+ }
19
+
20
+ declare function InternalBinding ( binding : 'worker' ) : {
21
+ Worker : typeof InternalWorkerBinding . Worker ;
22
+ getEnvMessagePort ( ) : InternalMessagingBinding . MessagePort ;
23
+ threadId : number ;
24
+ isMainThread : boolean ;
25
+ ownsProcessState : boolean ;
26
+ resourceLimits ?: Float64Array ;
27
+ kMaxYoungGenerationSizeMb : number ;
28
+ kMaxOldGenerationSizeMb : number ;
29
+ kCodeRangeSizeMb : number ;
30
+ kStackSizeMb : number ;
31
+ kTotalResourceLimitCount : number ;
32
+ } ;
You can’t perform that action at this time.
0 commit comments