mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Function and Object -> any in node.js libdefs (#59089)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/59089 X-link: https://github.com/react/metro/pull/2067 Soon, flow will interpret `Function` and `Object` to be their corresponding prototype instead of `any`. This diff changes the node.js libdef to use `any` to preserve existing behavior. Changelog: [Internal] Reviewed By: gkz Differential Revision: D125263780 fbshipit-source-id: 673a5088c89817f4c526384c73c01a2335f135de
This commit is contained in:
1 parent
15896bb519
commit
3d6a3811d8
1 file changed
+97
-109
Vendored
+97
-109
@@ -15,7 +15,7 @@ interface ErrnoError extends Error {
|
||||
code?: string;
|
||||
dest?: string;
|
||||
errno?: string | number;
|
||||
info?: Object;
|
||||
info?: any;
|
||||
path?: string;
|
||||
port?: number;
|
||||
syscall?: string;
|
||||
@@ -731,9 +731,9 @@ declare module 'cluster' {
|
||||
isDead(): boolean;
|
||||
kill(signal?: string): void;
|
||||
send(
|
||||
message: Object,
|
||||
sendHandleOrCallback?: child_process$Handle | Function,
|
||||
callback?: Function,
|
||||
message: any,
|
||||
sendHandleOrCallback?: child_process$Handle | any,
|
||||
callback?: any,
|
||||
): boolean;
|
||||
}
|
||||
|
||||
@@ -745,7 +745,7 @@ declare module 'cluster' {
|
||||
workers: {[id: number]: Worker};
|
||||
|
||||
disconnect(callback?: () => void): void;
|
||||
fork(env?: Object): Worker;
|
||||
fork(env?: any): Worker;
|
||||
setupMaster(settings?: ClusterSettingsOpt): void;
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ declare module 'cluster' {
|
||||
declare module 'console' {
|
||||
declare function assert(value: any, ...message: any): void;
|
||||
declare function dir(
|
||||
obj: Object,
|
||||
obj: any,
|
||||
options: {
|
||||
showHidden: boolean,
|
||||
depth: number,
|
||||
@@ -774,7 +774,7 @@ declare module 'console' {
|
||||
constructor(stdout: stream$Writable, stdin?: stream$Writable): void;
|
||||
assert(value: any, ...message: any): void;
|
||||
dir(
|
||||
obj: Object,
|
||||
obj: any,
|
||||
options: {
|
||||
showHidden: boolean,
|
||||
depth: number,
|
||||
@@ -1418,21 +1418,21 @@ declare class events$EventEmitter {
|
||||
static listenerCount(emitter: events$EventEmitter, event: string): number;
|
||||
static defaultMaxListeners: number;
|
||||
|
||||
addListener(event: string, listener: Function): this;
|
||||
addListener(event: string, listener: any): this;
|
||||
emit(event: string, ...args: Array<any>): boolean;
|
||||
eventNames(): Array<string>;
|
||||
listeners(event: string): Array<Function>;
|
||||
listeners(event: string): Array<any>;
|
||||
listenerCount(event: string): number;
|
||||
on(event: string, listener: Function): this;
|
||||
once(event: string, listener: Function): this;
|
||||
prependListener(event: string, listener: Function): this;
|
||||
prependOnceListener(event: string, listener: Function): this;
|
||||
on(event: string, listener: any): this;
|
||||
once(event: string, listener: any): this;
|
||||
prependListener(event: string, listener: any): this;
|
||||
prependOnceListener(event: string, listener: any): this;
|
||||
removeAllListeners(event?: string): this;
|
||||
removeListener(event: string, listener: Function): this;
|
||||
off(event: string, listener: Function): this;
|
||||
removeListener(event: string, listener: any): this;
|
||||
off(event: string, listener: any): this;
|
||||
setMaxListeners(n: number): this;
|
||||
getMaxListeners(): number;
|
||||
rawListeners(event: string): Array<Function>;
|
||||
rawListeners(event: string): Array<any>;
|
||||
}
|
||||
|
||||
declare module 'events' {
|
||||
@@ -1448,13 +1448,13 @@ declare class domain$Domain extends events$EventEmitter {
|
||||
members: Array<any>;
|
||||
|
||||
add(emitter: events$EventEmitter): void;
|
||||
bind(callback: Function): Function;
|
||||
bind(callback: any): any;
|
||||
dispose(): void;
|
||||
enter(): void;
|
||||
exit(): void;
|
||||
intercept(callback: Function): Function;
|
||||
intercept(callback: any): any;
|
||||
remove(emitter: events$EventEmitter): void;
|
||||
run(fn: Function): void;
|
||||
run(fn: any): void;
|
||||
}
|
||||
|
||||
declare module 'domain' {
|
||||
@@ -1617,10 +1617,10 @@ declare module 'fs' {
|
||||
declare function readlinkSync(path: string): string;
|
||||
declare function realpath(
|
||||
path: string,
|
||||
cache?: Object,
|
||||
cache?: any,
|
||||
callback?: (err: ?ErrnoError, resolvedPath: string) => void,
|
||||
): void;
|
||||
declare function realpathSync(path: string, cache?: Object): string;
|
||||
declare function realpathSync(path: string, cache?: any): string;
|
||||
declare function unlink(
|
||||
path: string,
|
||||
callback?: (err: ?ErrnoError) => void,
|
||||
@@ -2085,11 +2085,8 @@ declare module 'fs' {
|
||||
callback?: (err: ?ErrnoError) => void,
|
||||
): void;
|
||||
declare function accessSync(path: string, mode?: number): void;
|
||||
declare function createReadStream(path: string, options?: Object): ReadStream;
|
||||
declare function createWriteStream(
|
||||
path: string,
|
||||
options?: Object,
|
||||
): WriteStream;
|
||||
declare function createReadStream(path: string, options?: any): ReadStream;
|
||||
declare function createWriteStream(path: string, options?: any): WriteStream;
|
||||
declare function fdatasync(
|
||||
fd: number,
|
||||
callback: (err: ?ErrnoError) => void,
|
||||
@@ -2593,12 +2590,12 @@ declare class http$Agent<out SocketT = net$Socket> {
|
||||
declare class http$IncomingMessage<
|
||||
SocketT = net$Socket,
|
||||
> extends stream$Readable {
|
||||
headers: Object;
|
||||
headers: any;
|
||||
rawHeaders: Array<string>;
|
||||
httpVersion: string;
|
||||
method: string;
|
||||
trailers: Object;
|
||||
setTimeout(msecs: number, callback: Function): void;
|
||||
trailers: any;
|
||||
setTimeout(msecs: number, callback: any): void;
|
||||
socket: SocketT;
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
@@ -2620,7 +2617,7 @@ declare class http$ClientRequest<
|
||||
setHeader(name: string, value: string | Array<string>): void;
|
||||
setNoDelay(noDelay?: boolean): void;
|
||||
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
|
||||
setTimeout(msecs: number, callback?: Function): void;
|
||||
setTimeout(msecs: number, callback?: any): void;
|
||||
readonly socket: SocketT | null;
|
||||
}
|
||||
|
||||
@@ -2637,7 +2634,7 @@ declare class http$ServerResponse extends stream$Writable {
|
||||
removeHeader(name: string): void;
|
||||
sendDate: boolean;
|
||||
setHeader(name: string, value: string | Array<string>): void;
|
||||
setTimeout(msecs: number, callback?: Function): http$ServerResponse;
|
||||
setTimeout(msecs: number, callback?: any): http$ServerResponse;
|
||||
socket: net$Socket;
|
||||
statusCode: number;
|
||||
statusMessage: string;
|
||||
@@ -2656,13 +2653,13 @@ declare class http$Server extends net$Server {
|
||||
port?: number,
|
||||
hostname?: string,
|
||||
backlog?: number,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): this;
|
||||
// The following signatures are added to allow omitting intermediate arguments
|
||||
listen(port?: number, backlog?: number, callback?: Function): this;
|
||||
listen(port?: number, hostname?: string, callback?: Function): this;
|
||||
listen(port?: number, callback?: Function): this;
|
||||
listen(path: string, callback?: Function): this;
|
||||
listen(port?: number, backlog?: number, callback?: any): this;
|
||||
listen(port?: number, hostname?: string, callback?: any): this;
|
||||
listen(port?: number, callback?: any): this;
|
||||
listen(path: string, callback?: any): this;
|
||||
listen(
|
||||
handle: {
|
||||
port?: number,
|
||||
@@ -2675,7 +2672,7 @@ declare class http$Server extends net$Server {
|
||||
ipv6Only?: boolean,
|
||||
...
|
||||
},
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): this;
|
||||
listening: boolean;
|
||||
close(callback?: (error: ?Error) => unknown): this;
|
||||
@@ -2684,7 +2681,7 @@ declare class http$Server extends net$Server {
|
||||
maxHeadersCount: number;
|
||||
keepAliveTimeout: number;
|
||||
headersTimeout: number;
|
||||
setTimeout(msecs: number, callback: Function): this;
|
||||
setTimeout(msecs: number, callback: any): this;
|
||||
timeout: number;
|
||||
}
|
||||
|
||||
@@ -2693,13 +2690,13 @@ declare class https$Server extends tls$Server {
|
||||
port?: number,
|
||||
hostname?: string,
|
||||
backlog?: number,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): this;
|
||||
// The following signatures are added to allow omitting intermediate arguments
|
||||
listen(port?: number, backlog?: number, callback?: Function): this;
|
||||
listen(port?: number, hostname?: string, callback?: Function): this;
|
||||
listen(port?: number, callback?: Function): this;
|
||||
listen(path: string, callback?: Function): this;
|
||||
listen(port?: number, backlog?: number, callback?: any): this;
|
||||
listen(port?: number, hostname?: string, callback?: any): this;
|
||||
listen(port?: number, callback?: any): this;
|
||||
listen(path: string, callback?: any): this;
|
||||
listen(
|
||||
handle: {
|
||||
port?: number,
|
||||
@@ -2712,14 +2709,14 @@ declare class https$Server extends tls$Server {
|
||||
ipv6Only?: boolean,
|
||||
...
|
||||
},
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): this;
|
||||
close(callback?: (error: ?Error) => unknown): this;
|
||||
closeAllConnections(): void;
|
||||
closeIdleConnections(): void;
|
||||
keepAliveTimeout: number;
|
||||
headersTimeout: number;
|
||||
setTimeout(msecs: number, callback: Function): this;
|
||||
setTimeout(msecs: number, callback: any): this;
|
||||
timeout: number;
|
||||
}
|
||||
|
||||
@@ -2745,7 +2742,7 @@ type http$requestOptions = {
|
||||
agent?: boolean | http$Agent<net$Socket>,
|
||||
createConnection?: (
|
||||
options: net$connectOptions,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
) => net$Socket,
|
||||
...
|
||||
};
|
||||
@@ -2771,10 +2768,7 @@ declare module 'http' {
|
||||
|
||||
declare class Server extends http$Server {}
|
||||
declare class Agent extends http$Agent<net$Socket> {
|
||||
createConnection(
|
||||
options: net$connectOptions,
|
||||
callback?: Function,
|
||||
): net$Socket;
|
||||
createConnection(options: net$connectOptions, callback?: any): net$Socket;
|
||||
}
|
||||
declare class ClientRequest extends http$ClientRequest<net$Socket> {}
|
||||
declare class IncomingMessage extends http$IncomingMessage<net$Socket> {}
|
||||
@@ -2827,7 +2821,7 @@ type https$requestOptions = {
|
||||
agent?: boolean | http$Agent<tls$TLSSocket>,
|
||||
createConnection?: (
|
||||
options: tls$connectOptions,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
) => tls$TLSSocket,
|
||||
...
|
||||
};
|
||||
@@ -2892,7 +2886,7 @@ declare module 'module' {
|
||||
}
|
||||
|
||||
declare class net$Socket extends stream$Duplex {
|
||||
constructor(options?: Object): void;
|
||||
constructor(options?: any): void;
|
||||
address(): net$Socket$address;
|
||||
bufferSize: number;
|
||||
bytesRead: number;
|
||||
@@ -2904,7 +2898,7 @@ declare class net$Socket extends stream$Duplex {
|
||||
connectListener?: () => unknown,
|
||||
): net$Socket;
|
||||
connect(port: number, connectListener?: () => unknown): net$Socket;
|
||||
connect(options: Object, connectListener?: () => unknown): net$Socket;
|
||||
connect(options: any, connectListener?: () => unknown): net$Socket;
|
||||
destroyed: boolean;
|
||||
end(
|
||||
chunkOrEncodingOrCallback?:
|
||||
@@ -2923,7 +2917,7 @@ declare class net$Socket extends stream$Duplex {
|
||||
setEncoding(encoding?: string): this;
|
||||
setKeepAlive(enable?: boolean, initialDelay?: number): this;
|
||||
setNoDelay(noDelay?: boolean): this;
|
||||
setTimeout(timeout: number, callback?: Function): this;
|
||||
setTimeout(timeout: number, callback?: any): this;
|
||||
unref(): this;
|
||||
write(
|
||||
chunk: Buffer | Uint8Array | string,
|
||||
@@ -2937,16 +2931,16 @@ declare class net$Server extends events$EventEmitter {
|
||||
port?: number,
|
||||
hostname?: string,
|
||||
backlog?: number,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): net$Server;
|
||||
listen(path: string, callback?: Function): net$Server;
|
||||
listen(handle: Object, callback?: Function): net$Server;
|
||||
listen(path: string, callback?: any): net$Server;
|
||||
listen(handle: any, callback?: any): net$Server;
|
||||
listening: boolean;
|
||||
close(callback?: Function): net$Server;
|
||||
close(callback?: any): net$Server;
|
||||
address(): net$Socket$address;
|
||||
connections: number;
|
||||
maxConnections: number;
|
||||
getConnections(callback: Function): void;
|
||||
getConnections(callback: any): void;
|
||||
ref(): net$Server;
|
||||
unref(): net$Server;
|
||||
}
|
||||
@@ -2959,7 +2953,7 @@ type net$connectOptions = {
|
||||
family?: number,
|
||||
lookup?: (
|
||||
domain: string,
|
||||
options?: ?number | ?Object,
|
||||
options?: ?number | ?any,
|
||||
callback?: (err: ?Error, address: string, family: number) => void,
|
||||
) => unknown,
|
||||
path?: string,
|
||||
@@ -3400,7 +3394,7 @@ declare module 'punycode' {
|
||||
|
||||
declare module 'querystring' {
|
||||
declare function stringify(
|
||||
obj: Object,
|
||||
obj: any,
|
||||
separator?: string,
|
||||
equal?: string,
|
||||
options?: {encodeURIComponent?: (str: string) => string, ...},
|
||||
@@ -3928,7 +3922,7 @@ declare module 'stream' {
|
||||
}
|
||||
|
||||
declare class tty$ReadStream extends net$Socket {
|
||||
constructor(fd: number, options?: Object): void;
|
||||
constructor(fd: number, options?: any): void;
|
||||
isRaw: boolean;
|
||||
setRawMode(mode: boolean): void;
|
||||
isTTY: true;
|
||||
@@ -4023,7 +4017,7 @@ type tls$connectOptions = {
|
||||
path?: string,
|
||||
lookup?: (
|
||||
domain: string,
|
||||
options?: ?number | ?Object,
|
||||
options?: ?number | ?any,
|
||||
callback?: (err: ?Error, address: string, family: number) => void,
|
||||
) => unknown,
|
||||
requestOCSP?: boolean,
|
||||
@@ -4109,7 +4103,7 @@ type tls$Certificate = {
|
||||
};
|
||||
|
||||
declare class tls$TLSSocket extends net$Socket {
|
||||
constructor(socket: net$Socket, options?: Object): void;
|
||||
constructor(socket: net$Socket, options?: any): void;
|
||||
authorized: boolean;
|
||||
authorizationError: string | null;
|
||||
encrypted: true;
|
||||
@@ -4134,7 +4128,7 @@ declare class tls$TLSSocket extends net$Socket {
|
||||
getPeerCertificate(detailed?: boolean): tls$Certificate | null;
|
||||
getSession(): ?Buffer;
|
||||
getTLSTicket(): Buffer | void;
|
||||
renegotiate(options: Object, callback: Function): boolean | void;
|
||||
renegotiate(options: any, callback: any): boolean | void;
|
||||
setMaxSendFragment(size: number): boolean;
|
||||
}
|
||||
|
||||
@@ -4143,12 +4137,12 @@ declare class tls$Server extends net$Server {
|
||||
port?: number,
|
||||
hostname?: string,
|
||||
backlog?: number,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): tls$Server;
|
||||
listen(path: string, callback?: Function): tls$Server;
|
||||
listen(handle: Object, callback?: Function): tls$Server;
|
||||
close(callback?: Function): tls$Server;
|
||||
addContext(hostname: string, context: Object): void;
|
||||
listen(path: string, callback?: any): tls$Server;
|
||||
listen(handle: any, callback?: any): tls$Server;
|
||||
close(callback?: any): tls$Server;
|
||||
addContext(hostname: string, context: any): void;
|
||||
getTicketKeys(): Buffer;
|
||||
setTicketKeys(keys: Buffer): void;
|
||||
}
|
||||
@@ -4164,14 +4158,14 @@ declare module 'tls' {
|
||||
declare function getCiphers(): Array<string>;
|
||||
declare function convertNPNProtocols(
|
||||
NPNProtocols: Array<string>,
|
||||
out: Object,
|
||||
out: any,
|
||||
): void;
|
||||
declare function checkServerIdentity(
|
||||
servername: string,
|
||||
cert: string,
|
||||
): Error | void;
|
||||
declare function parseCertString(s: string): Object;
|
||||
declare function createSecureContext(details: Object): Object;
|
||||
declare function parseCertString(s: string): any;
|
||||
declare function createSecureContext(details: any): any;
|
||||
declare var SecureContext: tls$SecureContext;
|
||||
declare var TLSSocket: typeof tls$TLSSocket;
|
||||
declare var Server: typeof tls$Server;
|
||||
@@ -4184,21 +4178,21 @@ declare module 'tls' {
|
||||
): tls$Server;
|
||||
declare function connect(
|
||||
options: tls$connectOptions,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): tls$TLSSocket;
|
||||
declare function connect(
|
||||
port: number,
|
||||
host?: string,
|
||||
options?: tls$connectOptions,
|
||||
callback?: Function,
|
||||
callback?: any,
|
||||
): tls$TLSSocket;
|
||||
declare function createSecurePair(
|
||||
context?: Object,
|
||||
context?: any,
|
||||
isServer?: boolean,
|
||||
requestCert?: boolean,
|
||||
rejectUnauthorized?: boolean,
|
||||
options?: Object,
|
||||
): Object;
|
||||
options?: any,
|
||||
): any;
|
||||
}
|
||||
|
||||
type url$urlObject = {
|
||||
@@ -4211,7 +4205,7 @@ type url$urlObject = {
|
||||
readonly host?: string | null,
|
||||
readonly pathname?: string | null,
|
||||
readonly search?: string | null,
|
||||
readonly query?: Object | null,
|
||||
readonly query?: any | null,
|
||||
readonly hash?: string | null,
|
||||
...
|
||||
};
|
||||
@@ -4533,13 +4527,10 @@ declare module 'util' {
|
||||
declare function isRegExp(object: any): boolean;
|
||||
declare function isDate(object: any): boolean;
|
||||
declare function isError(object: any): boolean;
|
||||
declare function inherits(
|
||||
constructor: Function,
|
||||
superConstructor: Function,
|
||||
): void;
|
||||
declare function deprecate(f: Function, string: string): Function;
|
||||
declare function promisify(f: Function): Function;
|
||||
declare function callbackify(f: Function): Function;
|
||||
declare function inherits(constructor: any, superConstructor: any): void;
|
||||
declare function deprecate(f: any, string: string): any;
|
||||
declare function promisify(f: any): any;
|
||||
declare function callbackify(f: any): any;
|
||||
declare function stripVTControlCharacters(str: string): string;
|
||||
|
||||
declare function parseArgs<
|
||||
@@ -4825,7 +4816,7 @@ declare module 'vm' {
|
||||
code: string,
|
||||
params: string[],
|
||||
options: vm$CompileFunctionOptions,
|
||||
): Function;
|
||||
): any;
|
||||
}
|
||||
|
||||
type zlib$options = {
|
||||
@@ -5193,11 +5184,11 @@ declare module 'assert' {
|
||||
deepEqual(actual: any, expected: any, message?: string): void,
|
||||
notDeepEqual(actual: any, expected: any, message?: string): void,
|
||||
throws(
|
||||
block: Function,
|
||||
error?: Function | RegExp | ((err: any) => boolean),
|
||||
block: any,
|
||||
error?: any | RegExp | ((err: any) => boolean),
|
||||
message?: string,
|
||||
): void,
|
||||
doesNotThrow(block: Function, message?: string): void,
|
||||
doesNotThrow(block: any, message?: string): void,
|
||||
ifError(value: any): void,
|
||||
AssertionError: typeof AssertionError,
|
||||
strict: AssertStrict,
|
||||
@@ -5218,11 +5209,11 @@ declare module 'assert' {
|
||||
deepStrictEqual(actual: any, expected: any, message?: string): void,
|
||||
notDeepStrictEqual(actual: any, expected: any, message?: string): void,
|
||||
throws(
|
||||
block: Function,
|
||||
error?: Function | RegExp | ((err: any) => boolean),
|
||||
block: any,
|
||||
error?: any | RegExp | ((err: any) => boolean),
|
||||
message?: string,
|
||||
): void,
|
||||
doesNotThrow(block: Function, message?: string): void,
|
||||
doesNotThrow(block: any, message?: string): void,
|
||||
ifError(value: any): void,
|
||||
AssertionError: typeof AssertionError,
|
||||
strict: AssertStrict,
|
||||
@@ -5379,12 +5370,9 @@ declare module 'v8' {
|
||||
* @since v20.13.0
|
||||
* @experimental
|
||||
*/
|
||||
declare function queryObjects(ctor: any, options?: {format: 'count'}): number;
|
||||
declare function queryObjects(
|
||||
ctor: Function,
|
||||
options?: {format: 'count'},
|
||||
): number;
|
||||
declare function queryObjects(
|
||||
ctor: Function,
|
||||
ctor: any,
|
||||
options: {format: 'summary'},
|
||||
): Array<string>;
|
||||
|
||||
@@ -5395,7 +5383,7 @@ declare module 'v8' {
|
||||
*/
|
||||
declare function getCppHeapStatistics(
|
||||
detailLevel?: 'brief' | 'detailed',
|
||||
): Object;
|
||||
): any;
|
||||
|
||||
/**
|
||||
* Checks if a string's internal representation uses one byte per character (Latin-1/ISO-8859-1 encoding).
|
||||
@@ -5581,7 +5569,7 @@ declare module 'repl' {
|
||||
input?: stream$Readable,
|
||||
output?: stream$Writable,
|
||||
terminal?: boolean,
|
||||
eval?: Function,
|
||||
eval?: any,
|
||||
useColors?: boolean,
|
||||
useGlobal?: boolean,
|
||||
ignoreUndefined?: boolean,
|
||||
@@ -5603,7 +5591,7 @@ declare module 'inspector' {
|
||||
|
||||
declare function close(): void;
|
||||
declare function url(): string | void;
|
||||
declare var console: Object;
|
||||
declare var console: any;
|
||||
declare function waitForDebugger(): void;
|
||||
|
||||
declare class Session extends events$EventEmitter {
|
||||
@@ -5611,7 +5599,7 @@ declare module 'inspector' {
|
||||
connect(): void;
|
||||
connectToMainThread(): void;
|
||||
disconnect(): void;
|
||||
post(method: string, params?: Object, callback?: Function): void;
|
||||
post(method: string, params?: any, callback?: any): void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5629,7 +5617,7 @@ declare class Process extends events$EventEmitter {
|
||||
arch: string;
|
||||
argv: Array<string>;
|
||||
chdir(directory: string): void;
|
||||
config: Object;
|
||||
config: any;
|
||||
connected: boolean;
|
||||
cpuUsage(previousValue?: process$CPUUsage): process$CPUUsage;
|
||||
cwd(): string;
|
||||
@@ -5668,7 +5656,7 @@ declare class Process extends events$EventEmitter {
|
||||
};
|
||||
initgroups?: (user: number | string, extra_group: number | string) => void;
|
||||
kill(pid: number, signal?: string | number): void;
|
||||
mainModule: Object;
|
||||
mainModule: any;
|
||||
memoryUsage: {
|
||||
(): {
|
||||
arrayBuffers: number,
|
||||
@@ -5693,8 +5681,8 @@ declare class Process extends events$EventEmitter {
|
||||
};
|
||||
send?: (
|
||||
message: any,
|
||||
sendHandleOrCallback?: net$Socket | net$Server | Function,
|
||||
callback?: Function,
|
||||
sendHandleOrCallback?: net$Socket | net$Server | any,
|
||||
callback?: any,
|
||||
) => void;
|
||||
setegid?: (id: number | string) => void;
|
||||
seteuid?: (id: number | string) => void;
|
||||
@@ -5723,8 +5711,8 @@ declare var __dirname: string;
|
||||
declare function setImmediate(
|
||||
callback: (...args: Array<any>) => unknown,
|
||||
...args: Array<any>
|
||||
): Object;
|
||||
declare function clearImmediate(immediateObject: any): Object;
|
||||
): any;
|
||||
declare function clearImmediate(immediateObject: any): any;
|
||||
|
||||
declare module 'worker_threads' {
|
||||
declare var isMainThread: boolean;
|
||||
@@ -5793,7 +5781,7 @@ declare module 'worker_threads' {
|
||||
}
|
||||
|
||||
declare type WorkerOptions = {|
|
||||
env?: Object,
|
||||
env?: any,
|
||||
eval?: boolean,
|
||||
workerData?: any,
|
||||
stdin?: boolean,
|
||||
|
||||
Reference in new issue
Block a user