However, this is not strictly valid Typescript, since the actual return type does not match the declared return type. Notice that the actual return type is null, while the declared return type is Promise<ifm.IHttpClientResponse>.
Fixing this issue may require modifying the Typescript types to better describe intent. Here's one way we could do it:
Notice how there are now two different kinds of authentication handlers: with and without auth. If a handler does not support authentication, it does not need to implement the handleAuthentication() method!
The authentication handlers in
auth.ts
all definehandleAuthentication
methods that look like this:However, this is not strictly valid Typescript, since the actual return type does not match the declared return type. Notice that the actual return type is
null
, while the declared return type isPromise<ifm.IHttpClientResponse>
.Fixing this issue may require modifying the Typescript types to better describe intent. Here's one way we could do it:
Notice how there are now two different kinds of authentication handlers: with and without auth. If a handler does not support authentication, it does not need to implement the
handleAuthentication()
method!