Giter Site home page Giter Site logo

Comments (3)

NetanelBasal avatar NetanelBasal commented on May 30, 2024 1

That's interesting! The problem is that many people started writing their applications according to the ngrx official example which is the way I support it. I will examine the matter, and when I have time, I will try to create an option for what you are offering. Thanks.

from ngrx-generator.

NetanelBasal avatar NetanelBasal commented on May 30, 2024

So you are saving the * as syntax, but I think the compiler generates more code in your example, can you check it, please?

from ngrx-generator.

farin99 avatar farin99 commented on May 30, 2024

It actually seems to create less code 👍 :)

Compiled Code:
With namespace (1619 characters)

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_services_utils__ = __webpack_require__(83);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TeamUsersActions; });

var TeamUsersActions;
(function (TeamUsersActions) {
    TeamUsersActions.LOAD = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shared_services_utils__["a" /* type */])('[Team Users] Load');
    TeamUsersActions.LOAD_SUCCESS = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shared_services_utils__["a" /* type */])('[Team Users] Load Success');
    TeamUsersActions.LOAD_FAIL = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shared_services_utils__["a" /* type */])('[Team Users] Load Fail');
    /**
     * Load Team Users Actions
     */
    var LoadAction = (function () {
        function LoadAction() {
            this.type = TeamUsersActions.LOAD;
        }
        return LoadAction;
    }());
    TeamUsersActions.LoadAction = LoadAction;
    var LoadSuccessAction = (function () {
        function LoadSuccessAction(payload) {
            this.payload = payload;
            this.type = TeamUsersActions.LOAD_SUCCESS;
        }
        return LoadSuccessAction;
    }());
    TeamUsersActions.LoadSuccessAction = LoadSuccessAction;
    var LoadFailAction = (function () {
        function LoadFailAction(payload) {
            this.payload = payload;
            this.type = TeamUsersActions.LOAD_FAIL;
        }
        return LoadFailAction;
    }());
    TeamUsersActions.LoadFailAction = LoadFailAction;
})(TeamUsersActions || (TeamUsersActions = {}));

without (1716 characters):

"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shared_services_utils__ = __webpack_require__(83);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return LOAD; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return LOAD_SUCCESS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return LOAD_FAIL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LoadAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return LoadSuccessAction; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return LoadFailAction; });

var LOAD = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shared_services_utils__["a" /* type */])('[Team Users] Load');
var LOAD_SUCCESS = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shared_services_utils__["a" /* type */])('[Team Users] Load Success');
var LOAD_FAIL = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shared_services_utils__["a" /* type */])('[Team Users] Load Fail');
/**
 * Load Team Users Actions
 */
var LoadAction = (function () {
    function LoadAction() {
        this.type = LOAD;
    }
    return LoadAction;
}());

var LoadSuccessAction = (function () {
    function LoadSuccessAction(payload) {
        this.payload = payload;
        this.type = LOAD_SUCCESS;
    }
    return LoadSuccessAction;
}());

var LoadFailAction = (function () {
    function LoadFailAction(payload) {
        this.payload = payload;
        this.type = LOAD_FAIL;
    }
    return LoadFailAction;
}());

from ngrx-generator.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.