Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Process

Hierarchy

Index

Properties

allowedNodeEnvironmentFlags

allowedNodeEnvironmentFlags: ReadonlySet<string>

The process.allowedNodeEnvironmentFlags property is a special, read-only Set of flags allowable within the [NODE_OPTIONS][] environment variable.

arch

arch: string

argv

argv: string[]

argv0

argv0: string

config

config: { target_defaults: { cflags: any[]; default_configuration: string; defines: string[]; include_dirs: string[]; libraries: string[] }; variables: { clang: number; host_arch: string; node_install_npm: boolean; node_install_waf: boolean; node_prefix: string; node_shared_openssl: boolean; node_shared_v8: boolean; node_shared_zlib: boolean; node_use_dtrace: boolean; node_use_etw: boolean; node_use_openssl: boolean; target_arch: string; v8_no_strict_aliasing: number; v8_use_snapshot: boolean; visibility: string } }

Type declaration

  • target_defaults: { cflags: any[]; default_configuration: string; defines: string[]; include_dirs: string[]; libraries: string[] }
    • cflags: any[]
    • default_configuration: string
    • defines: string[]
    • include_dirs: string[]
    • libraries: string[]
  • variables: { clang: number; host_arch: string; node_install_npm: boolean; node_install_waf: boolean; node_prefix: string; node_shared_openssl: boolean; node_shared_v8: boolean; node_shared_zlib: boolean; node_use_dtrace: boolean; node_use_etw: boolean; node_use_openssl: boolean; target_arch: string; v8_no_strict_aliasing: number; v8_use_snapshot: boolean; visibility: string }
    • clang: number
    • host_arch: string
    • node_install_npm: boolean
    • node_install_waf: boolean
    • node_prefix: string
    • node_shared_openssl: boolean
    • node_shared_v8: boolean
    • node_shared_zlib: boolean
    • node_use_dtrace: boolean
    • node_use_etw: boolean
    • node_use_openssl: boolean
    • target_arch: string
    • v8_no_strict_aliasing: number
    • v8_use_snapshot: boolean
    • visibility: string

connected

connected: boolean

debugPort

debugPort: number

domain

domain: Domain

env

execArgv

execArgv: string[]

execPath

execPath: string

Optional exitCode

exitCode: undefined | number

features

features: { debug: boolean; inspector: boolean; ipv6: boolean; tls: boolean; tls_alpn: boolean; tls_ocsp: boolean; tls_sni: boolean; uv: boolean }

Type declaration

  • debug: boolean
  • inspector: boolean
  • ipv6: boolean
  • tls: boolean
  • tls_alpn: boolean
  • tls_ocsp: boolean
  • tls_sni: boolean
  • uv: boolean

hrtime

hrtime: HRTime

Optional mainModule

mainModule: Module

pid

pid: number

platform

platform: Platform

ppid

ppid: number

release

Optional report

Only available with --experimental-report

stderr

stderr: WriteStream

Can also be a tty.WriteStream, not typed due to limitation.s

stdin

stdin: ReadStream

stdout

stdout: WriteStream

Can also be a tty.WriteStream, not typed due to limitation.s

title

title: string

version

version: string

versions

versions: ProcessVersions

Methods

abort

  • abort(): void
  • Returns void

addListener

chdir

  • chdir(directory: string): void
  • Parameters

    • directory: string

    Returns void

cpuUsage

  • Parameters

    Returns CpuUsage

cwd

  • cwd(): string
  • Returns string

disconnect

  • disconnect(): void
  • Returns void

emit

  • emit(event: "beforeExit", code: number): boolean
  • emit(event: "disconnect"): boolean
  • emit(event: "exit", code: number): boolean
  • emit(event: "rejectionHandled", promise: Promise<any>): boolean
  • emit(event: "uncaughtException", error: Error): boolean
  • emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean
  • emit(event: "warning", warning: Error): boolean
  • emit(event: "message", message: any, sendHandle: any): this
  • emit(event: Signals, signal: Signals): boolean
  • emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this
  • emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this
  • emit(event: "multipleResolves", listener: MultipleResolveListener): this
  • Parameters

    • event: "beforeExit"
    • code: number

    Returns boolean

  • Parameters

    • event: "disconnect"

    Returns boolean

  • Parameters

    • event: "exit"
    • code: number

    Returns boolean

  • Parameters

    • event: "rejectionHandled"
    • promise: Promise<any>

    Returns boolean

  • Parameters

    • event: "uncaughtException"
    • error: Error

    Returns boolean

  • Parameters

    • event: "unhandledRejection"
    • reason: any
    • promise: Promise<any>

    Returns boolean

  • Parameters

    • event: "warning"
    • warning: Error

    Returns boolean

  • Parameters

    • event: "message"
    • message: any
    • sendHandle: any

    Returns this

  • Parameters

    Returns boolean

  • Parameters

    • event: "newListener"
    • eventName: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

  • Parameters

    • event: "removeListener"
    • eventName: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

  • Parameters

    Returns this

emitWarning

  • emitWarning(warning: string | Error, name?: undefined | string, ctor?: Function): void
  • Parameters

    • warning: string | Error
    • Optional name: undefined | string
    • Optional ctor: Function

    Returns void

eventNames

  • eventNames(): Array<string | symbol>

exit

  • exit(code?: undefined | number): never
  • Parameters

    • Optional code: undefined | number

    Returns never

getMaxListeners

  • getMaxListeners(): number

getegid

  • getegid(): number
  • Returns number

geteuid

  • geteuid(): number
  • Returns number

getgid

  • getgid(): number
  • Returns number

getgroups

  • getgroups(): number[]
  • Returns number[]

getuid

  • getuid(): number
  • Returns number

hasUncaughtExceptionCaptureCallback

  • hasUncaughtExceptionCaptureCallback(): boolean
  • Returns boolean

kill

  • kill(pid: number, signal?: string | number): void
  • Parameters

    • pid: number
    • Optional signal: string | number

    Returns void

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

memoryUsage

  • Returns MemoryUsage

nextTick

  • nextTick(callback: Function, ...args: any[]): void
  • Parameters

    • callback: Function
    • Rest ...args: any[]

    Returns void

off

  • off(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

once

openStdin

  • Returns Socket

prependListener

prependOnceListener

rawListeners

  • rawListeners(event: string | symbol): Function[]

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): this
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

resourceUsage

  • Returns ResourceUsage

Optional send

  • send(message: any, sendHandle?: any, options?: undefined | { swallowErrors?: undefined | false | true }, callback?: undefined | ((error: Error | null) => void)): boolean
  • Parameters

    • message: any
    • Optional sendHandle: any
    • Optional options: undefined | { swallowErrors?: undefined | false | true }
    • Optional callback: undefined | ((error: Error | null) => void)

    Returns boolean

setMaxListeners

  • setMaxListeners(n: number): this

setUncaughtExceptionCaptureCallback

  • setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void
  • Parameters

    • cb: ((err: Error) => void) | null

    Returns void

setegid

  • setegid(id: number | string): void
  • Parameters

    • id: number | string

    Returns void

seteuid

  • seteuid(id: number | string): void
  • Parameters

    • id: number | string

    Returns void

setgid

  • setgid(id: number | string): void
  • Parameters

    • id: number | string

    Returns void

setgroups

  • setgroups(groups: Array<string | number>): void
  • Parameters

    • groups: Array<string | number>

    Returns void

setuid

  • setuid(id: number | string): void
  • Parameters

    • id: number | string

    Returns void

umask

  • umask(mask?: undefined | number): number
  • Can only be set if not in worker thread.

    Parameters

    • Optional mask: undefined | number

    Returns number

uptime

  • uptime(): number
  • Returns number