UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

32 lines (29 loc) 748 B
import { assert } from "../../../../core/assert.js"; export class InputBinding { /** * * @param {string} path * @param {function} listener * @param {boolean} [exclusive=false] */ constructor({ path, listener, exclusive = false }) { assert.isString(path, 'path'); assert.isFunction(listener, 'listener'); assert.isBoolean(exclusive, 'exclusive'); /** * * @type {string} */ this.path = path; /** * * @type {Function} */ this.listener = listener; /** * @deprecated don't use * @type {boolean} */ this.exclusive = exclusive; } }