UNPKG

eyeglass

Version:
36 lines 1.5 kB
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; const Eyeglass_1 = __importStar(require("./Eyeglass")); // This is how we convince typescript that there's an object that is // both a constructor and a function that returns options. function newOrOptions() { const __Eyeglass = function (options) { if (arguments.length === 2) { Eyeglass_1._forbidNodeSassArg(arguments[1]); } let instance = new Eyeglass_1.default(options); if (this) { // the implicit this object is thrown away :engineer-shrugging: return instance; } else { return instance.options; } }; __Eyeglass.prototype = Eyeglass_1.default.prototype; __Eyeglass.VERSION = Eyeglass_1.default.VERSION; __Eyeglass.helpers = Eyeglass_1.default.helpers; __Eyeglass.resetGlobalCaches = Eyeglass_1.resetGlobalCaches; // eslint-disable-next-line @typescript-eslint/no-explicit-any return __Eyeglass; // we have to cast through any otherwise typescript thinks this function doesn't implement the full API of EyeglassImpl. } const Eyeglass = newOrOptions(); module.exports = Eyeglass; /* eslint-enable @typescript-eslint/no-namespace */ //# sourceMappingURL=index.js.map