roiact
Version:
44 lines (41 loc) • 990 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.successBlueprint = exports.requestStateBlueprint = exports.requestBlueprint = exports.failureBlueprint = exports.actionCreator = void 0;
var actionCreator = function actionCreator(type) {
return function (payload) {
return {
type: type,
payload: payload
};
};
};
exports.actionCreator = actionCreator;
var requestStateBlueprint = {
fetching: false,
fetched: false,
error: false,
errorCode: null,
errorMessage: null
};
exports.requestStateBlueprint = requestStateBlueprint;
var requestBlueprint = {
fetching: true,
error: false
};
exports.requestBlueprint = requestBlueprint;
var successBlueprint = {
fetching: false,
fetched: true,
error: false,
errorCode: null,
errorMessage: null
};
exports.successBlueprint = successBlueprint;
var failureBlueprint = {
fetching: false,
fetched: true,
error: true
};
exports.failureBlueprint = failureBlueprint;