Closed jwheeler-gs closed 4 years ago
As a very hacky workaround to be able to compile right now, I'm currently doing the following:
interface MyClient extends TypeOfGenericClient<Client> {
register: typeof Client.register;
}
client = await (issuer.Client as MyClient).register(this.metadata);
Yeah i’ll see to get it fixed. Thanks for raising this
There seems to be a type definition problem with
TypeOfGenericClient<Client>
. Theregister
method is declared asstatic
and cannot be accessed from aClient
instance according to the TS definition. Given the code below:I am getting this error:
I'm using the code the same way as the javascript example in this repo's tests folder. I'm not sure if I need to do something differently for Typescript or not. Is there an example somewhere of how to do dynamic registration differently for typescript usage of this library? It looks like in TS land the
register
method is static instead of being an instance member?