First off great to see Sendbird moving to first class Typescript support!
We are running into some initial issues around creating a type safe client with the new module system.
let sendbirdChat: SendbirdChat;
const init = () => {
if (!sendbirdChat) {
sendbirdChat = SendbirdChat.init({
appId: 'APP_ID',
localCacheEnabled: true,
modules: [new GroupChannelModule()],
useAsyncStorageStore: AsyncStorage,
});
}
return sendbirdChat;
};
// @ts-expect-error Property 'groupChannel' does not exist on type 'SendbirdChat'
sendbirdChat.groupChannel
Any suggestions for how to create a type safe client that uses modules?
We could work around this if ModuleNamespaces
and Modules
types were exposed publicly