/** * This file contains definitions for things that we'd really rather the closure compiler *didn't* minify. * See http://code.google.com/p/closure-compiler/wiki/FAQ#How_do_I_write_an_externs_file * See also the discussion here: https://github.com/kripken/emscripten/issues/1979 * * The closure_compiler() method in tools/shared.py refers to this file when calling closure. */ // Closure externs used by library_uuid.js /** * @param {Array} typedArray */ crypto.getRandomValues = function(typedArray) {}; /** BEGIN_NODE_INCLUDE var crypto = require('crypto'); END_NODE_INCLUDE */ /** * @type {Object.} */ var crypto = {}; /** * @param {number} size * @param {function(Error, buffer.Buffer)} callback */ crypto.randomBytes = function(size, callback) {}; // Closure externs used by library_sockfs.js /** BEGIN_NODE_INCLUDE var ws = require('ws'); END_NODE_INCLUDE */ /** * @type {Object.} */ var ws = {}; /** * @param {string} event * @param {function()} callback */ ws.on = function(event, callback) {}; /** * @param {Object} data * @param {Object} flags * @param {function()=} callback */ ws.send = function(data, flags, callback) {}; /** * @type {boolean} */ ws.binaryType; /** * @type {Object.} */ var wss = ws.Server; /** * @param {string} event * @param {function()} callback */ wss.on = function(event, callback) {}; /** * @param {function()} callback */ wss.broadcast = function(callback) {}; /** * @type {Object.} */ wss._socket; /** * @type {string} */ wss.url; /** * @type {string} */ wss._socket.remoteAddress; /** * @type {number} */ wss._socket.remotePort; /** * @type {Object.} */ var flags = {}; /** * @type {boolean} */ flags.binary; /** * @fileoverview Definitions for W3C's Gamepad specification. * @see http://www.w3.org/TR/gamepad/ * @externs */ /** * @typedef {{id: string, index: number, timestamp: number, axes: Array., buttons: Array.}} */ var Gamepad; /** * @type {Array.} */ Gamepad.buttons; /** * @type {Array.} */ Gamepad.axes; /** * @type {number} */ Gamepad.index; /** * @type {string} */ Gamepad.id; /** * @type {number} */ Gamepad.timestamp; /** * @return {Array.} */ navigator.getGamepads = function() {}; /** * @return {Array.} */ navigator.webkitGetGamepads = function() {}; /** * @return {Array.} */ navigator.webkitGamepads = function() {}; /** * @return {Array.} */ navigator.mozGamepads = function() {}; /** * @return {Array.} */ navigator.gamepads = function() {};