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 project to TypeScript

See original GitHub issue

As a binary-heavy module with a lot of complicated parameters, this is a valuable module to add typescript to. In the past, we’ve failed to add a proper declaration file, so rather than take that half-measure, we should actually convert the module to TypeScript.

In case we add a bounty, we need well defined acceptance criteria. Those would be:

  • The changes should obviously not change module behavior at all.
  • All method parameters and return types should be typed.
  • Should introduce an npm build script which builds the typescript file into an output file.
  • the package.json main field should point to the built output.
  • Anyone re-running build should be able to deterministically produce the same output.
  • The typedef file should be generated programmatically from the input script.
  • Migrating to yarn in the process is acceptable but not required.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
danfinlaycommented, Jan 7, 2020

Okay, a quick review of #73, it seems to have merely moved the .js to .ts file. That’s very funny, because JS is valid TS, but it isn’t what is intended by this issue, I’ll be clarifying the master post to clarify.

3reactions
gitcoinbotcommented, Dec 13, 2019

💰 A crowdfund contribution worth 5.00000 DAI (5.0 USD @ $1.0/DAI) has been attached to this funded issue from @bakkdoor.💰

Want to chip in also? Add your own contribution here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Migrating from JavaScript - TypeScript
If you're looking to convert a React project, we recommend looking at the React Conversion Guide first. Setting up your Directories. If you're...
Read more >
Converting a Javascript project to Typescript - Medium
You can do so by running the following command in the root directory of your project. npm install --save-dev typescript ts-loader. Step 2: ......
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 >
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 >
8 Tips for Converting That Big Project to TypeScript
The hybrid method allows your team to migrate to TypeScript without stopping the development process. Use the allowJs compiler option to add new ......
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