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

前端 未结 9 2453
灰色年华
灰色年华 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 18:56

    For me it was my editor issue. VSCode was including an import from the declaration files (*.d.ts) while the actual class was in another place.

    I replaced the declaration file import with the actual class file import.

提交回复
热议问题