How gonna assign in const { Types, Creators }
in the below code I mean what Types gonna hold and what Creators gonna hold.
const { Types, Creators } = createActions({
userRequest: ['username'],
userSuccess: ['avatar'],
userFailure: null
})
var createActions = (function (config, options) {
if (R.isNil(config)) {
throw new Error('an object is required to setup types and creators');
}
if (R.isEmpty(config)) {
throw new Error('empty objects are not supported');
}
return {
Types: convertToTypes(config, options),
Creators: convertToCreators(config, options)
};
})