Problems building a streaming data source


I’m trying to develop a streaming (live) datasource plugin.
All the links I’m referring to are in this gist (I am not allowed to post more than 2):

I’m basically following the plugin development guide [1] and the streaming datasource guide [2].
I came up with a working version of the basic datasource that generates a sine wave (master branch of [3]).
But when I try to use the Observable type, I end up getting errors I don’t understand. You can check the code (websocket branch of [3]), and the errors on circleci [4] or gist [5]. Here is the short version of the error I get for convenience:

Type 'Observable<DataQueryResponse>' is not assignable to type 'Promise<DataQueryResponse> | Observable<DataQueryResponse>'.

It seems this is due to a bug in the toolchain.