installing
“@sendbird/chat”: “^4.2.2”,
“@sendbird/uikit-react-native”: “^2.1.0”,
“typescript”: “4.8.4”,
getting this error:
ERROR [Error: TransformError SyntaxError in …/…/node_modules/@sendbird/uikit-chat-hooks/src/common/useUserList.ts: …/…/node_modules/@sendbird/uikit-chat-hooks/src/common/useUserList.ts: Unexpected token, expected “?” (41:60)
39 | Options extends UseUserListOptions,
40 | QueriedUser extends UserStruct = Options[‘queryCreator’] extends Optional<
41 | () => CustomQueryInterface
| ^
42 | >
43 | ? User
44 | : SendbirdUser,]
workaround:
path package change type to any :\
i am having the same issue , how u rosolved it ?
use path-package change type to any :\
@sendbird+uikit-chat-hooks+2.1.0.patch
diff --git a/node_modules/@sendbird/uikit-chat-hooks/src/common/useUserList.ts b/node_modules/@sendbird/uikit-chat-hooks/src/common/useUserList.ts
index 19e707b..6684870 100644
--- a/node_modules/@sendbird/uikit-chat-hooks/src/common/useUserList.ts
+++ b/node_modules/@sendbird/uikit-chat-hooks/src/common/useUserList.ts
@@ -35,16 +35,10 @@ const createUserQuery = <User extends UserStruct>(
* })
* ```
* */
-export const useUserList = <
- Options extends UseUserListOptions<QueriedUser>,
- QueriedUser extends UserStruct = Options['queryCreator'] extends Optional<
- () => CustomQueryInterface<infer User extends UserStruct>
- >
- ? User
- : SendbirdUser,
->(
+type QueriedUser = any;
+export const useUserList = (
sdk: SendbirdChatSDK,
- options?: Options,
+ options?:any,
): UseUserListReturn<QueriedUser> => {
const query = useRef<CustomQueryInterface<QueriedUser>>();