Angular and RxJS imports

后端 未结 3 1591
走了就别回头了
走了就别回头了 2021-01-02 03:33

I\'ve always known to import my Observable operators separately to limit the load times. However I\'ve noticed something today that I hope someone could please

3条回答
  •  盖世英雄少女心
    2021-01-02 03:51

    Starting from WebStorm 2016.3 (I believe), you have an option to blacklist certain imports. Editor > Code Style > StypeScript

    Do not import exactly from: [rxjs]
    

    Additionally, there is a flag available in tslint to prohibit global imports:

    {
      "rules": {
        "import-blacklist": [true, "rxjs"]
      }
    }
    

提交回复
热议问题