Convert to TypeScript
See original GitHub issueThis is an issue to track the progress of converting this project to TypeScript. The plan is to do this incrementally in order to make the transition as smooth as possible and not make the review process too overwhelming. The overall plan is:
- Incrementally convert
docs
to TypeScript.
- TypeScript files can import Flow files if they have a corresponding TypeScript declaration file, so we’ll just do a breadth-first conversion.
- Import
react-select
types from@types/react-select
in this step. - Fix types in
@types/react-select
to make it work withdocs
. - PRs:
- Add TypeScript infrastructure (https://github.com/JedWatson/react-select/pull/4139)
- Convert Webpack config to TypeScript (https://github.com/JedWatson/react-select/pull/4143)
- Incrementally convert docs to TypeScript (part 1) (https://github.com/JedWatson/react-select/pull/4144)
- Incrementally convert docs to TypeScript (part 2) (TODO)
- etc.
- Move Typescript declaration files from
@types/react-select
to this repository. - Incrementally convert main source files to TypeScript.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Documentation - Migrating from JavaScript - TypeScript
Converting a JavaScript codebase over to TypeScript is, while somewhat tedious, usually not challenging. In this tutorial, we're going to look at how...
Read more >Converting JavaScript to TypeScript - TutorialsTeacher
Converting Existing JavaScript to TypeScript · Add tsconfig.json file to project · Integrate with a build tool · Change all .js files to...
Read more >Online Javascript to Typescript Converter Tool - JavaInUse
Online tool to convert a javascript file to typescript. Complex javascript files can be converted to typescript file using this tool.
Read more >Converting a Javascript project to Typescript | Geek Culture
The process · Step 1: Install TypeScript compiler and loader · Step 2 · Step 3: Create a configuration file · Step 4:...
Read more >How to Migrate Application From JavaScript to TypeScript
TypeScript is a superset of JavaScript, so valid JavaScript code is a valid TypeScript code. Incremental migration, converting the whole project step by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! Yeah, you got it. And don’t forget to add yourself as a definition owner as well.
Regarding the minimum required version: Can you just remove the
// TypeScript version 2.9
that currently exists? DefinitelyTyped by default sets the minimum version to any TypeScript version less than 2 years old, which is 3.3 right now. I’d like to try to stick with that default minimum version if possible unless there’s a compelling reason why we need to use newer versions.@kylemh Thanks for all your help so far on PRs! I saw on https://github.com/JedWatson/react-select/issues/4293 that you’re looking to help out with the TS conversion. Most of the work is actually already done. (I have the entire code-base converted to TypeScript on a branch, it’s just a matter of figuring out how best to merge it in.)
The PRs I’ve made so far have been to incrementally convert the docs to TypeScript using the types that currently exist on DefinitelyTyped. When I run across a problem in the types, I make a PR to DefinitelyTyped. This works, however it’s slow because there are no active reviewers for react-select on DefinitelyTyped. Would be willing to update the types on DefinitelyTyped to 3.1 (by adding the
isLoading
prop toAsyncSelect
) and also add yourself as a definition author? That way we can review each others PRs on DefinitelyTyped and this process can be sped up quite a bit.Thanks for all your hard work!