-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[RNSDK] Compile Typescript to Javascript before deploying #14718
Comments
Interesting request. I'll be honest, nobody has asked yet, so I'm hesitant to make any changes until we receive more feedback.
I think our SDK should ship with the tsconfig file we use (tsconfig.native.json at the root folder) and that would be solved. |
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 ( 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. |
I don't think we have special rules in our sample app though, it's a standard TS RN app. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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: