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

Add TS typings to the lib #107

Open
luisnaranjo733 opened this issue Jul 30, 2018 · 4 comments
Open

Add TS typings to the lib #107

luisnaranjo733 opened this issue Jul 30, 2018 · 4 comments

Comments

@luisnaranjo733
Copy link

No description provided.

@lucasferreira
Copy link
Owner

Hi @luisnaranjo733

I do not work with TypeScript, could you help us with that issue and create a PR?

@luisnaranjo733
Copy link
Author

I don't want to commit to that because I'm not sure if I'm going to need to use a custom webview like this yet.

If anyone else wants to take a stab at it - there is a useful guide here.

@lucasferreira
Copy link
Owner

Hi @luisnaranjo733,

I do not want to convert all the package to TypeScript, it's not my main work language and I would be possible to do updates in a future.

Do you know if your suggestion "TS typings" could be some optional setup, that's works with or without TypeScript?

@luisnaranjo733
Copy link
Author

luisnaranjo733 commented Aug 2, 2018

Sorry, I should have clarified.

Adding typings to a project means adding a typescript definitions (similar to header files in Obj-C). JS users can continue using their plan JS, and TS users can install the typings and get type safety when using this project.

For example, react-native is written in JS but its typings are maintained by the community so that TS users can get typings :)

For this project, it will likely be as simple as adding an index.d.ts file that declares the exported types of the module

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

2 participants