Skip to content
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

More TS #301

Merged
merged 33 commits into from
Nov 4, 2024
Merged

More TS #301

merged 33 commits into from
Nov 4, 2024

Conversation

lishaduck
Copy link
Contributor

@lishaduck lishaduck commented Nov 4, 2024

Slowly, steadily, yet always onward, pushing forward, toward the goal.

In other words, more types. Or rather, better types, as this was mostly fixing mistakes. (Nope, I ended up just finishing #125)

Resolves #125.

@lishaduck lishaduck force-pushed the more-ts branch 2 times, most recently from 1fd229c to bfeebc9 Compare November 4, 2024 17:22
/**
* @param {Template} template
* @param {string} commit
*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not a return type annotation? (Same of other functions in this file)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They should, but I used the IDE inferer to get started, which skips them, unfortunately, and I didn't realize it until I was done.
TS infers them though, so I think it can be left for a follow-up.

Comment on lines +362 to +363
* @param {string} dest
* @param {string} elmModulePath
Copy link
Owner

@jfmengels jfmengels Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be more accurate:

 * @param {Path} dest
 * @param {Path} elmModulePath

Same for elmBinary below and other places in this file.

This is just a shorthand for all of the strict rules the TS team feels are ergonomic.
I disabled `useUnknownInCatch` variables for now, though.
tsconfig changes can affect types, which affect typed linting results.
Copy link

socket-security bot commented Nov 4, 2024

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] filesystem Transitive: environment, eval, network, shell, unsafe +50 4.37 MB rlefevre
npm/[email protected] environment Transitive: filesystem +31 700 kB mysticatea

View full report↗︎

@jfmengels jfmengels merged commit bdaa693 into jfmengels:main Nov 4, 2024
3 checks passed
@lishaduck lishaduck deleted the more-ts branch November 4, 2024 23:07
@jfmengels
Copy link
Owner

Woohoo! This is a great step forward!
Thank you @lishaduck 😊

@lishaduck lishaduck mentioned this pull request Nov 6, 2024
lishaduck added a commit to lishaduck/node-elm-review that referenced this pull request Nov 6, 2024
Address review comments from jfmengels#301.
lishaduck added a commit to lishaduck/node-elm-review that referenced this pull request Nov 6, 2024
Address review comments from jfmengels#301.
lishaduck added a commit to lishaduck/node-elm-review that referenced this pull request Nov 6, 2024
Address review comments from jfmengels#301.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add types to JS files
2 participants