Open
Description
Our invoke function in the JS client looks like this:
public async invoke<TData = unknown, TUri extends Uri | string = string>(
options: InvokerOptions<TUri>
): Promise<InvokeResult<TData>> {
return super.invoke({
...options,
uri: Uri.from(options.uri),
});
}
There is a problem in how the generics are defined, in which if we pass a generic for the result type, the Uri must be a string (unless its defined). For example, if we do this:
const t = await client.invoke<String>({
uri: new Uri("wrap/polywrap"),
method: "h"
})
}
It will complain because the uri
is of type Uri
, instead of String
we should support that the default is Uri
Metadata
Metadata
Assignees
Labels
No labels