'Observable' is not a class derived from 'Observable'

前端 未结 9 2463
灰色年华
灰色年华 2020-12-29 18:11

When trying to extend a class from a class in a node_modules the typescript compiler throws a error saying:

Property \'source\' is protected but

9条回答
  •  清歌不尽
    2020-12-29 19:02

    If there are multiple node_modules folders you have to add a path mapping in the host app's tsconfig. Just map @rxjs/* to the root node_modules/rxjs/*. Then everything works fine.

提交回复
热议问题