Closed iuricmp closed 1 month ago
In dsocial/mobile, I enter npm run ts:check
. You may want to do the same. Here are the relevant errors that it prints for me.
app/sign-up.tsx:100:35 - error TS2740: Type 'User' is missing the following properties from type 'KeyInfo': type, pubKey, equals, clone, and 8 more.
100 await dispatch(loggedIn({ keyInfo: newAccount })).unwrap();
~~~~~~~
redux/features/accountSlice.ts:16:3
16 keyInfo: KeyInfo;
~~~~~~~
The expected type comes from property 'keyInfo' which is declared here on type 'LoginParam'
src/hooks/use-user-cache.ts:37:28 - error TS2345: Argument of type '{ name: any; password: string; pubKey: string; address: any; avatar: string; }' is not assignable to parameter of type 'User'.
Property 'bech32' is missing in type '{ name: any; password: string; pubKey: string; address: any; avatar: string; }' but required in type 'User'.
37 usersCache.set(bech32, user);
~~~~
types.ts:20:3
20 bech32: string;
~~~~~~
'bech32' is declared here.
src/hooks/use-user-cache.ts:39:5 - error TS2322: Type '{ name: any; password: string; pubKey: string; address: any; avatar: string; }' is not assignable to type 'User'.
39 return user;
~~~~~~
Be careful in this use of
call
. You put the caller address beforesend
. https://github.com/gnolang/dsocial/blob/925846f2055e9f107cd91ddb776afa3e7be06820/mobile/redux/features/signupSlice.ts#L210