question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Convert to TypeScript

See original GitHub issue

This 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:

  1. Incrementally convert docs to TypeScript.
  1. Move Typescript declaration files from @types/react-select to this repository.
  2. Incrementally convert main source files to TypeScript.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Methuselah96commented, Dec 21, 2020

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.

1reaction
Methuselah96commented, Dec 15, 2020

@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 to AsyncSelect) 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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found