Path: blob/main/third_party/closure-compiler/node-externs/events.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 "events" module.18* @see http://nodejs.org/api/events.html19* @see https://github.com/joyent/node/blob/master/lib/events.js20* @externs21* @author Daniel Wirtz <[email protected]>22*/2324/**25BEGIN_NODE_INCLUDE26var events = require('events');27END_NODE_INCLUDE28*/2930/**31* @type {Object.<string,*>}32*/33var events = {};3435/**36* @constructor37*/38events.EventEmitter = function() {};3940/**41* @param {string} event42* @param {function(...)} listener43* @return {events.EventEmitter}44*/45events.EventEmitter.prototype.addListener = function(event, listener) {};4647/**48* @param {string} event49* @param {function(...)} listener50* @return {events.EventEmitter}51*/52events.EventEmitter.prototype.on = function(event, listener) {};5354/**55* @param {string} event56* @param {function(...)} listener57* @return {events.EventEmitter}58*/59events.EventEmitter.prototype.once = function(event, listener) {};6061/**62* @param {string} event63* @param {function(...)} listener64* @return {events.EventEmitter}65*/66events.EventEmitter.prototype.removeListener = function(event, listener) {};6768/**69* @param {string=} event70* @return {events.EventEmitter}71*/72events.EventEmitter.prototype.removeAllListeners = function(event) {};7374/**75* @param {number} n76*/77events.EventEmitter.prototype.setMaxListeners = function(n) {};7879/**80* @param {string} event81* @return {Array.<function(...)>}82*/83events.EventEmitter.prototype.listeners = function(event) {};8485/**86* @param {string} event87* @param {...*} var_args88* @return {boolean}89*/90events.EventEmitter.prototype.emit = function(event, var_args) {};9192// Undocumented9394/**95* @type {boolean}96*/97events.usingDomains;9899/**100* @param {events.EventEmitter} emitter101* @param {string} type102*/103events.EventEmitter.listenerCount = function(emitter, type) {};104105106