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/readline.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 readline module. Depends on the events module.
19
* @see http://nodejs.org/api/readline.html
20
* @externs
21
* @author Daniel Wirtz <[email protected]>
22
*/
23
24
/**
25
BEGIN_NODE_INCLUDE
26
var readline = require('readline');
27
END_NODE_INCLUDE
28
*/
29
30
/**
31
* @type {Object.<string,*>}
32
*/
33
var readline = {};
34
35
/**
36
* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function(*, Array)=), terminal: boolean}} options
37
* @return {readline.Interface}
38
*/
39
readline.createInterface = function(options) {};
40
41
/**
42
* @constructor
43
* @extends events.EventEmitter
44
*/
45
readline.Interface = function() {};
46
47
/**
48
* @param {string} prompt
49
* @param {number} length
50
*/
51
readline.Interface.prototype.setPrompt = function(prompt, length) {};
52
53
/**
54
* @param {boolean=} preserveCursor
55
*/
56
readline.Interface.prototype.prompt = function(preserveCursor) {};
57
58
/**
59
* @param {string} query
60
* @param {function(string)} callback
61
*/
62
readline.Interface.prototype.question = function(query, callback) {};
63
64
/**
65
*/
66
readline.Interface.prototype.pause = function() {};
67
68
/**
69
*/
70
readline.Interface.prototype.resume = function() {};
71
72
/**
73
*/
74
readline.Interface.prototype.close = function() {};
75
76
/**
77
* @param {string} data
78
* @param {Object.<string,*>=} key
79
*/
80
readline.Interface.prototype.write = function(data, key) {};
81
82