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/child_process.js
6172 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 child_process module. Depends on the events module.
19
* @see http://nodejs.org/api/child_process.html
20
* @see https://github.com/joyent/node/blob/master/lib/child_process.js
21
* @externs
22
* @author Daniel Wirtz <[email protected]>
23
*/
24
25
/**
26
BEGIN_NODE_INCLUDE
27
var child_process = require('child_process');
28
END_NODE_INCLUDE
29
*/
30
31
/**
32
* @type {Object.<string,*>}
33
*/
34
var child_process = {};
35
36
/**
37
* @constructor
38
* @param {...*} var_args
39
* @extends events.EventEmitter
40
*/
41
child_process.ChildProcess = function(var_args) {}; // Private?
42
43
/**
44
* @type {stream.ReadableStream}
45
*/
46
child_process.ChildProcess.prototype.stdin;
47
48
/**
49
* @type {stream.WritableStream}
50
*/
51
child_process.ChildProcess.prototype.stdout;
52
53
/**
54
* @type {stream.WritableStream}
55
*/
56
child_process.ChildProcess.prototype.stderr;
57
58
/**
59
* @type {number}
60
*/
61
child_process.ChildProcess.prototype.pid;
62
63
/**
64
* @param {string=} signal
65
*/
66
child_process.ChildProcess.prototype.kill = function(signal) {};
67
68
/**
69
* @param {Object.<string,*>} message
70
* @param {*} sendHandle
71
*/
72
child_process.ChildProcess.prototype.send = function(message, sendHandle) {};
73
74
/**
75
*/
76
child_process.ChildProcess.prototype.disconnect = function() {};
77
78
/**
79
* @typedef {{cwd: string, stdio: (Array|string), customFds: Array, env: Object.<string,*>, detached: boolean, uid: number, gid: number, encoding: string, timeout: number, maxBuffer: number, killSignal: string}}
80
*/
81
child_process.Options;
82
83
/**
84
* @param {string} command
85
* @param {Array.<string>=} args
86
* @param {child_process.Options=} options
87
* @return {child_process.ChildProcess}
88
*/
89
child_process.ChildProcess.spawn = function(command, args, options) {};
90
91
/**
92
* @param {string} command
93
* @param {child_process.Options|function(Error, nodeBuffer.Buffer, nodeBuffer.Buffer)=} options
94
* @param {function(Error, nodeBuffer.Buffer, nodeBuffer.Buffer)=} callback
95
* @return {child_process.ChildProcess}
96
*/
97
child_process.exec = function(command, options, callback) {};
98
99
/**
100
* @param {string} file
101
* @param {Array.<string>} args
102
* @param {child_process.Options} options
103
* @param {function(Error, nodeBuffer.Buffer, nodeBuffer.Buffer)} callback
104
* @return {child_process.ChildProcess}
105
*/
106
child_process.execFile = function(file, args, options, callback) {};
107
108
/**
109
* @param {string} modulePath
110
* @param {Array.<string>=} args
111
* @param {child_process.Options=} options
112
* @return {child_process.ChildProcess}
113
*/
114
child_process.fork = function(modulePath, args, options) {};
115
116