Returned value of makeHTTPDriver() doesn't typecheck when passed two arguments
Author: JavranCreated May 29, 2021Updated Jun 8, 2021
Code to reproduce the issue:
for @cycle/http:
http = makeHTTPDriver()(request$, 'fooHttp')
Expected behavior:
This should typecheck.
Actual behavior:
This doesn't typecheck as makeHTTPDriver() returns a function expecting exactly one argument but passed two instead.
Versions of packages used:
@cycle/[email protected]
For anyone come across this, my current workaround is to give drive a more accurate type:
const driver: ((stream: Stream<RequestInput>, name?: string) => HTTPSource) =
(makeHTTPDriver() as any)
http = driver(request$, 'fooHttp')Source: cyclejs/cyclejs