UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

27 lines (20 loc) 579 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExecutionContext = void 0; class ExecutionContext { constructor(id, envRuntime, env, components) { this.id = id; this.envRuntime = envRuntime; this.env = env; this.components = components; } // applyAll<T>(name: string, args: any[]): ServiceMap<T> {} apply(name, args) { if (!this.env[name]) { throw new Error(`method ${name} not implemented`); } return this.env[name].apply(this.env, ...args); } } exports.ExecutionContext = ExecutionContext;