Path: blob/main/third_party/closure-compiler/node-externs/vm.js
6174 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 vm module.18* @see http://nodejs.org/api/vm.html19* @see https://github.com/joyent/node/blob/master/lib/vm.js20* @externs21* @author Daniel Wirtz <[email protected]>22*/2324/**25BEGIN_NODE_INCLUDE26var vm = require('vm');27END_NODE_INCLUDE28*/2930/**31* @type {Object.<string,*>}32*/33var vm = {};3435/**36* @constructor37*/38vm.Context = function() {}; // Does not really exist3940/**41* @param {string} code42* @param {string=} filename43*/44vm.runInThisContext = function(code, filename) {};4546/**47* @param {string} code48* @param {Object.<string,*>=} sandbox49* @param {string=} filename50*/51vm.runInNewContext = function(code, sandbox, filename) {};5253/**54* @param {string} code55* @param {vm.Context} context56* @param {string=} filename57*/58vm.runInContext = function(code, context, filename) {};5960/**61* @param {Object.<string,*>=} initSandbox62* @return {vm.Context}63* @nosideeffects64*/65vm.createContext = function(initSandbox) {};6667/**68* @constructor69*/70vm.Script = function() {};7172/**73* @param {string} code74* @param {string=} filename75* @return {vm.Script}76* @nosideeffects77*/78vm.createScript = function(code, filename) {};7980/**81*/82vm.Script.prototype.runInThisContext = function() {};8384/**85* @param {Object.<string,*>=} sandbox86*/87vm.Script.prototype.runInNewContext = function(sandbox) {};888990