You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jitsi React Native SDK contains a Typescript-only version of the package (there are Typescript files instead of Javascript files): npmjs/@jitsi/react-native-sdk#codeTab
Maybe a better solution would be to compile TS to JS when new version releasing?
I know people who doesn't use Typescript, they use Javascript inside their React Native projects
Also when I run a type checking process using tsc --noEmit command in my project I see many errors from node_modules/@jitsi/react-native/sdk:
# tsc --noEmit
node_modules/@jitsi/react-native-sdk/index.tsx:16:33 - error TS2307: Cannot find module '../react/features/breakout-rooms/types' or its corresponding type declarations.
16 import type { IRoomsInfo } from '../react/features/breakout-rooms/types';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@jitsi/react-native-sdk/index.tsx:82:30 - error TS2531: Object is possibly 'null'.
82 const dispatch = app.current.state.store.dispatch;
~~~~~~~~~~~
node_modules/@jitsi/react-native-sdk/index.tsx:87:30 - error TS2531: Object is possibly 'null'.
87 const dispatch = app.current.state.store.dispatch;
~~~~~~~~~~~
...
Found 624 errors in 227 files.
It happens because Typescript (inside my project) imports the Jitsi RN SDK package as part of its own code rather than detecting it as an external package (because when we use import ... from '@jitsi/react-native-sdk' we import a index.tsx file instead of a index.js file which does not exist).
The text was updated successfully, but these errors were encountered:
Interesting request. I'll be honest, nobody has asked yet, so I'm hesitant to make any changes until we receive more feedback.
Maybe you're right. But this is the first time I've seen a library that doesn't compile Typescript into Javascript before release. In particular, this is due to the fact that the Typescript versions may not match within the project and within the library, which will lead to problems. More often I see compiled files into Javascript and separately files of Typescript types (*.d.ts, declaration option in tsconfig.json).
Also, as I know, it is impossible in Typescript when compiling to set separate compilation rules for a separate directory (this is not ifint or gitignor), as a result, all developers will have to forcefully change the compilation rules on their projects to the compilation rules of this library, which is strange and often impossible.
Description:
Jitsi React Native SDK contains a Typescript-only version of the package (there are Typescript files instead of Javascript files):
npmjs/@jitsi/react-native-sdk#codeTab
Maybe a better solution would be to compile TS to JS when new version releasing?
I know people who doesn't use Typescript, they use Javascript inside their React Native projects
Also when I run a type checking process using
tsc --noEmit
command in my project I see many errors fromnode_modules/@jitsi/react-native/sdk
:It happens because Typescript (inside my project) imports the Jitsi RN SDK package as part of its own code rather than detecting it as an external package (because when we use
import ... from '@jitsi/react-native-sdk'
we import aindex.tsx
file instead of aindex.js
file which does not exist).The text was updated successfully, but these errors were encountered: