UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

16 lines 520 B
import { validateObservable } from './validateObservable.js'; /** * A validator function which checks whether an input value is a {@link Box}. * Doesn't stop the validator chain. * * @category XML */ export function validateBox(value) { // TODO it would be nice if param validators would assert input types validateObservable(value)[0]; if (!('setValue' in value)) { throw new Error('Invalid Box; no "setValue" method'); } return [value, false]; } //# sourceMappingURL=validateBox.js.map