【发布时间】:2021-05-05 15:44:24
【问题描述】:
我想订阅但没有工作。
检查我的代码:
服务:
在ts中:
test() { return test }
在订阅我看到:
Property 'subscribe' does not exist on type 'void'.ts(2339)
什么问题?
【问题讨论】:
-
似乎
this.hubConnection.on没有返回任何内容。实际上,回调在on参数内,它不会返回 Observable... -
我同意,但是如何解决这个问题