-
Notifications
You must be signed in to change notification settings - Fork 395
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
Typescript type definitions for @lingui/core #351
Comments
I would love to get involved in this, but I am really busy lately. Either way, I will chime in with an opinion. I've found this flowgen tools which should be able to generate flow types out of typescript. I think it's worth the try. It would mean to use TypeScript in the code and get flow out of it in a build step. I wouldn't worry too much about rewrite as on the base level it's pretty similar. |
I see. I would rather do it the other way round (e.g. flow-to-typescript) or manually for now. I don't have much spare time either. Learning Typescript and rewrite/maintain the repo might be too much at the moment. Let's review this option next month when I should be more available. |
Sure, other way around can work too, I wasn't able to find that tool you have. If it works, it would probably easiest route instead of maintaining separate typescript files manually. If it can generate quality typings, why not use it for a whole repo, not just a core one? Btw, TypeScript is not really that different from the Flow, at least syntactically speaking. I know it sounds bit scary, been there too. It looks like something completely different from what you know, perhaps it's not even JavaScript? :D Trust me, it's not like that and you would be surprised how smooth experience it is. Doesn't matter, it was just my opinion. Since this is not a priority right now and we are both busy, perhaps someone else would be able to saddle this beast :) |
I'll take a stab at this. |
@Kalabhairava Great! Thanks a lot! Just to be clear: only provide typings based on Flow types. Either manually or automated using conversion tool. Please don't rewrite the whole library to Typescript 🙈 |
@tricoder42, I'm having trouble setting up the environment. The step
Any leads on fixing that? When I run Thanks! |
@Kalabhairava Are you sure you can run NVM like this? I am on Windows, so I am not sure how that works. I guess you will have more luck filling an issue at NVM repo. |
@Kalabhairava What shell do you use? There's related issue in nvm repo: nvm-sh/nvm#1719 |
Just leaving it here for futures reference mui/material-ui-pickers#674 |
@Kalabhairava are you started working on this? Maybe I can help you? |
@Shermayster, my apologies 😞 I'm caught up with a lot of work since the last few weeks, so I wasn't able to take a look at this issue. Please remove the My apologies again 😞 |
The documentation suggests this work is already done. f789af1#diff-4cf0ca2c328ede20791c3f181ed03586R11
Am I missing something? |
You can install types with Also And Any issues with the types can be reported here: https://github.com/huan086/lingui-typings/issues?utf8=✓&q=is%3Aissue+ The PRs against the @types repo can be found at: https://github.com/DefinitelyTyped/DefinitelyTyped/pulls?q=is%3Apr+lingui+is%3Aclosed A PR for this project to support TS extraction is at https://github.com/lingui/js-lingui/pull/228/files |
|
This is a HactoberFest issue! Read the contest details for more info.
Before you begin
next
branch as a base for your PR. This feature should be released in upcoming v3.Description
Provide Typescript type definitions for
@lingui/core
Core exports few types from
i18n.js
using Flow type checker. I recently learned that it's possible to publish Typescript declaration files. This would be great for Typescript users.Task
Provide declaration file for
i18n.js
module and add it topackage.json
Additional info
I have no experience with Typescript at all. Any suggestions about publishing or testing are welcome!
The text was updated successfully, but these errors were encountered: