Path: blob/main/third_party/closure-compiler/node-externs/readline.js
6172 views
/*1* Copyright 2012 The Closure Compiler Authors.2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14*/1516/**17* @fileoverview Definitions for node's readline module. Depends on the events module.18* @see http://nodejs.org/api/readline.html19* @externs20* @author Daniel Wirtz <[email protected]>21*/2223/**24BEGIN_NODE_INCLUDE25var readline = require('readline');26END_NODE_INCLUDE27*/2829/**30* @type {Object.<string,*>}31*/32var readline = {};3334/**35* @param {{input: stream.ReadableStream, output: stream.WritableStream, completer: function(string, function(*, Array)=), terminal: boolean}} options36* @return {readline.Interface}37*/38readline.createInterface = function(options) {};3940/**41* @constructor42* @extends events.EventEmitter43*/44readline.Interface = function() {};4546/**47* @param {string} prompt48* @param {number} length49*/50readline.Interface.prototype.setPrompt = function(prompt, length) {};5152/**53* @param {boolean=} preserveCursor54*/55readline.Interface.prototype.prompt = function(preserveCursor) {};5657/**58* @param {string} query59* @param {function(string)} callback60*/61readline.Interface.prototype.question = function(query, callback) {};6263/**64*/65readline.Interface.prototype.pause = function() {};6667/**68*/69readline.Interface.prototype.resume = function() {};7071/**72*/73readline.Interface.prototype.close = function() {};7475/**76* @param {string} data77* @param {Object.<string,*>=} key78*/79readline.Interface.prototype.write = function(data, key) {};808182