stream-chat-js
stream-chat-js copied to clipboard
Type error in client.ts
Hello,
after update to version 8.12.0, I receive this tsc error in my project, what can I do here?
$ tsc -p tsconfig.json --noEmit --pretty
node_modules/stream-chat/src/client.ts:1784:45 - error TS2345: Argument of type 'string | ChannelData<StreamChatGenerics>' is not assignable to parameter of type 'string'.
Type 'ChannelData<StreamChatGenerics>' is not assignable to type 'string'.
1784 return this.getChannelById(channelType, channelIDOrCustom, custom);
~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/stream-chat/src/client.ts:1784
Running on node 18,
This is my tsconfig.json:
{
"compilerOptions": {
"allowJs": false,
"allowSyntheticDefaultImports": true,
"alwaysStrict": true,
"baseUrl": "./src",
"checkJs": false,
"declaration": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["dom", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"noImplicitAny": true,
"noImplicitReturns": false,
"noImplicitThis": true,
"noStrictGenericChecks": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"outDir": "dist",
"paths": {
"components/*": ["components/*"],
"containers/*": ["containers/*"],
"enums/*": ["enums/*"],
"microapps/*": ["microapps/*"],
"pages/*": ["pages/*"],
"router/*": ["router/*"],
"store/*": ["store/*"],
"utils/*": ["utils/*"]
},
"pretty": true,
// Keep comments for webpackChunkNames.
"removeComments": false,
"resolveJsonModule": true,
"rootDir": ".",
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": false,
"target": "es2018"
},
"exclude": ["public", "node_modules", "dist"],
"include": ["src"]
}
Can someone from your team react on this? It's impossible to use your SDK in TS project
Will be great to know solution for that. We have the same issue...