Closed philippedasilva-orizone closed 1 year ago
Thanks. Do you know how to contribute type definition fixes? I don't know how to do typescript so the type definitions are entirely community contributed, so please help fix!
Issue fixed by https://github.com/amark/gun/pull/1309
Thanks. Closing then!
If you try to use gun.users().auth() method using the last 4th argument to allow the end user to change his/her password using Typescript, you get an error stating that the string value passed to it isn't of the type '"newPassword"'
This is because the type is declared in
gun/types/sea/OptionsUserAuth.d.ts
asexport type OptionsUserAuth = { change: 'newPassword' };
instead of what should be:export type OptionsUserAuth = { change: string };
There is a simple workaround that relies simply on casting the string value passed to the change property to any but it breaks typescript's proper use.