You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument of type 'UserMeta' is not assignable to parameter of type 'JSONObject'. Index signature for type 'string' is missing in type 'UserMeta'
importUserMetadatafrom'supertokens-node/recipe/usermetadata';// ...laterinterfaceUserMeta{foo: string;}constuserMetadata: UserMeta={foo: 'bar',};awaitUserMetadata.updateUserMetadata(response.user.id,userMetadata,// Argument of type 'UserMeta' is not assignable to parameter of type 'JSONObject'. Index signature for type 'string' is missing in type 'UserMeta'.);
Switching from interface to a type works ok:
typeUserMeta={foo: string;};
I haven't made the effort to figure out why, but if seems like incorrect behavior.
The text was updated successfully, but these errors were encountered:
Your preferences might not be shared by the consumers of your library. In the project I'm working on, we need to use a class as the type of the metadata due to the framework we're using. Type-casting to appease the ts compiler is totally fine for us, I'm just letting you know that this is an annoyance.
The following code causes this ts error:
Argument of type 'UserMeta' is not assignable to parameter of type 'JSONObject'. Index signature for type 'string' is missing in type 'UserMeta'
Switching from interface to a type works ok:
I haven't made the effort to figure out why, but if seems like incorrect behavior.
The text was updated successfully, but these errors were encountered: