Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error in client.ts #1198

Open
DmitryMarkov opened this issue Nov 20, 2023 · 2 comments
Open

Type error in client.ts #1198

DmitryMarkov opened this issue Nov 20, 2023 · 2 comments

Comments

@DmitryMarkov
Copy link

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"]
}
@tarasom
Copy link

tarasom commented Jan 4, 2024

Can someone from your team react on this? It's impossible to use your SDK in TS project

@rnavarych
Copy link

Will be great to know solution for that. We have the same issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants