Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/third_party/closure-compiler/node-externs/process.js
6171 views
1
/*
2
* Copyright 2012 The Closure Compiler Authors.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
/**
18
* @fileoverview Definitions for node's global process object. Depends on the stream module.
19
* @see http://nodejs.org/api/process.html
20
* @externs
21
* @author Daniel Wirtz <[email protected]>
22
*/
23
24
/**
25
* @constructor
26
* @extends events.EventEmitter
27
*/
28
var process = function() {};
29
30
/**
31
* @type {stream.ReadableStream}
32
*/
33
process.stdin;
34
35
/**
36
* @type {stream.WritableStream}
37
*/
38
process.stdout;
39
40
/**
41
* @type {stream.WritableStream}
42
*/
43
process.stderr;
44
45
/**
46
* @type {Array.<string>}
47
*/
48
process.argv;
49
50
/**
51
* @type {string}
52
*/
53
process.execPath;
54
55
/**
56
*/
57
process.abort = function() {};
58
59
/**
60
* @param {string} directory
61
*/
62
process.chdir = function(directory) {};
63
64
/**
65
* @return {string}
66
* @nosideeffects
67
*/
68
process.cwd = function() {};
69
70
/**
71
* @type {Object.<string,string>}
72
*/
73
process.env;
74
75
/**
76
* @param {number=} code
77
*/
78
process.exit = function(code) {};
79
80
/**
81
* @return {number}
82
* @nosideeffects
83
*/
84
process.getgid = function() {};
85
86
/**
87
* @param {number} id
88
*/
89
process.setgid = function(id) {};
90
91
/**
92
* @return {number}
93
* @nosideeffects
94
*/
95
process.getuid = function() {};
96
97
/**
98
* @param {number} id
99
*/
100
process.setuid = function(id) {};
101
102
/**
103
* @type {!string}
104
*/
105
process.version;
106
107
/**
108
* @type {Object.<string,string>}
109
*/
110
process.versions;
111
112
/**
113
* @type {Object.<string,*>}
114
*/
115
process.config;
116
117
/**
118
* @param {number} pid
119
* @param {string=} signal
120
*/
121
process.kill = function(pid, signal) {};
122
123
/**
124
* @type {number}
125
*/
126
process.pid;
127
128
/**
129
* @type {string}
130
*/
131
process.title;
132
133
/**
134
* @type {string}
135
*/
136
process.arch;
137
138
/**
139
* @type {string}
140
*/
141
process.platform;
142
143
/**
144
* @return {Object.<string,number>}
145
* @nosideeffects
146
*/
147
process.memoryUsage = function() {};
148
149
/**
150
* @param {!function()} callback
151
*/
152
process.nextTick = function(callback) {};
153
154
/**
155
* @param {number=} mask
156
*/
157
process.umask = function(mask) {};
158
159
/**
160
* @return {number}
161
* @nosideeffects
162
*/
163
process.uptime = function() {};
164
165
/**
166
* @return {number}
167
* @nosideeffects
168
*/
169
process.hrtime = function() {};
170
171
/**
172
*/
173
process.binding = function(name) {};
174
175
/**
176
* @type {number}
177
*/
178
process.exitCode;
179
180