Our invoke function in the JS client looks like this:
publicasyncinvoke<TData=unknown,TUriextendsUri|string=string>(options: InvokerOptions<TUri>): Promise<InvokeResult<TData>>{returnsuper.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:
constt=awaitclient.invoke<String>({uri: newUri("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
Our invoke function in the JS client looks like this:
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:
It will complain because the
uriis of typeUri, instead ofStringwe should support that the default isUri