-
Notifications
You must be signed in to change notification settings - Fork 33
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 TypeScript support #70
Comments
Would love to see this implemented if possible! 😄 Running into an exact use case where our codebase is in typescript, but our testing suite for all things cadence needs to be run in js. |
Type definitions are now added for the main API functions, and they can be installed with: npm i --save-dev @types/onflow__flow-js-testing |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue To Be Solved
Add support for TypeScript, so that autocomplete and other developer tooling works.
(Optional): Suggest A Solution
Solution 1: Rewrite in TypeScript
Pretty self explanatory. Would probably take weeks because TypeScript usually messes you up at edge cases. This would automatically generate type definitions when building to JavaScript.
Solution 2:
Create
.d.ts
file. This would have to be maintained "separately" if the code base stays in plain JavaScript. Separately means here that you might forget to update the.d.ts
file and functions don't conform to it.Comparison
Solution 1 (rewrite) is certainly more work than solution 2 (type declarations). TypeScript is widely used right now and many developers would consider it easier to contribute to the codebase after solution 1, if it was fully written in TypeScript - (which may or may not be objectively true).
(Optional): Context
Its not blocking anything, but it makes development a little harder because you always have to check out the docs and (depending on the strictness of your config) TypeScript constantly yells at you for missing types.
The text was updated successfully, but these errors were encountered: