UNPKG

jvsveml6070

Version:

Node.js package for the Vishay VEML6070 UVA Light Sensor, written in TypeScript.

22 lines (21 loc) 632 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseError = void 0; class BaseError extends Error { /** * Creates a new `BaseError` instance. * * @param message - The error message. * @param parentError - An optional parent error (can be either an `Error` instance or a string). */ constructor(message, parentError) { super(message); if ('string' === typeof parentError) { this.parentError = new Error(parentError); } else { this.parentError = parentError; } } } exports.BaseError = BaseError;