UNPKG

rx-sandbox

Version:

Marble diagram DSL based test suite for RxJS 6/7

28 lines 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.interopOptionsFromArgument = exports.defaultOption = void 0; const defaultOption = { autoFlush: false, frameTimeFactor: 1, maxFrameValue: 1000, flushWithAsyncTick: false, }; exports.defaultOption = defaultOption; const interopOptionsFromArgument = (args) => { var _a, _b, _c; if (args.length === 0) { return defaultOption; } // old interface not using options object if (args.length > 1 || typeof args[0] === 'boolean') { return { autoFlush: (_a = args[0]) !== null && _a !== void 0 ? _a : defaultOption.autoFlush, frameTimeFactor: (_b = args[1]) !== null && _b !== void 0 ? _b : defaultOption.frameTimeFactor, maxFrameValue: (_c = args[2]) !== null && _c !== void 0 ? _c : defaultOption.maxFrameValue, flushWithAsyncTick: false, }; } return Object.assign(Object.assign({}, defaultOption), args[0]); }; exports.interopOptionsFromArgument = interopOptionsFromArgument; //# sourceMappingURL=interopOptionsFromArgument.js.map