UNPKG

item-selection

Version:
28 lines (21 loc) 867 B
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } import { ItemSelection } from './immutable'; var MutableItemSelection = /*#__PURE__*/ function (_ItemSelection) { _inheritsLoose(MutableItemSelection, _ItemSelection); function MutableItemSelection() { return _ItemSelection.apply(this, arguments) || this; } var _proto = MutableItemSelection.prototype; _proto.set = function set(selection, lastIndex) { this.selection = selection; this.lastIndex = lastIndex; return this; }; return MutableItemSelection; }(ItemSelection); export default function mutableItemSelection(items, selection, lastIndex) { return new MutableItemSelection(items, selection, lastIndex); } export { MutableItemSelection };