UNPKG

vuex-xhr-state

Version:

Use Vuex to manage the state of you're ajax calls.

30 lines (29 loc) 1.16 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import VuexXhr from './VuexXhr'; var VuexXhrPut = /** @class */ (function (_super) { __extends(VuexXhrPut, _super); // @todo the pending prop uses the payload so for every put there is a pending in the state // @todo function fetch is not correct when we do put function VuexXhrPut(options) { var _this = this; options = options || {}; options.cache = false; options.alwaysRefetch = true; _this = _super.call(this, options) || this; return _this; } return VuexXhrPut; }(VuexXhr)); export { VuexXhrPut };