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

refactor typedefs in src/language-js/print/ternary.js #8745

Conversation

brodybits
Copy link
Contributor

  • move the JSDoc typedefs to the beginning of src/language-js/print/ternary.js
  • add & use JSDoc typedef for @param {FastPath} path, which effectively reverts the change in PR Refactor: Use FastPath type def in JSDoc type comments #8740
  • keep JSDoc typedef for @typedef {Object} OperatorOptions in its own comment block

I think these changes should improve the readability.

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@brodybits brodybits marked this pull request as draft July 13, 2020 19:52
@brodybits
Copy link
Contributor Author

I set this back to draft status. When I tried yarn lint:typecheck with type checking of this file enabled intsconfig.json, it gave me the following error:

src/language-js/print/ternary.js:131:12 - error TS2304: Cannot find name 'Options'.

131  * @param {Options} options - Prettier options

I would really rather resolve this error, and the type errors in the modules it depends on, before continuing with this proposal.

I hope to have some more progress in the near future. My apologies for the bother.

@brodybits
Copy link
Contributor Author

Closing in favor of the changes in PR #8759

@brodybits brodybits closed this Jul 15, 2020
@brodybits brodybits deleted the refactor-typedefs-in-language-js-print-ternary branch July 15, 2020 04:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants