Skip to content

Clean up resolveIndexedAccessMethod#8936

Merged
cryptodev-2s merged 2 commits into
feat/messenger-docs-sitefrom
clean-up-resolve-indexed-access-method
May 29, 2026
Merged

Clean up resolveIndexedAccessMethod#8936
cryptodev-2s merged 2 commits into
feat/messenger-docs-sitefrom
clean-up-resolve-indexed-access-method

Conversation

@mcmire
Copy link
Copy Markdown
Contributor

@mcmire mcmire commented May 29, 2026

Explanation

resolveIndexedAccessMethod still contains istanbul ignore comments. Most of these are unnecessary, and the logic actually ought to be tested.

This commit cleans up these istanbul ignore comments, and also adds new ones to clarify the existing logic. It also renames resolveIndexedAccessMethod to findClassMethodDeclaration so that it's easier to understand the purpose of this function at a glance.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Documentation extraction only; behavior is clarified and covered by new tests, with no runtime product surface change.

Overview
Refactors messenger action handler resolution in platform-api-docs extraction: resolveIndexedAccessMethod is renamed to findClassMethodDeclaration, with clearer guards, inline examples, and removal of istanbul ignore coverage skips on paths that are now meant to run in production.

Adds five tests that assert when Class['method'] cannot be resolved (object-literal type, keyof, numeric index, namespace-qualified class, missing method), docs still show the raw handler type text instead of failing or inventing a signature. Successful resolution behavior is unchanged; only naming, comments, and test coverage for fallbacks differ.

Reviewed by Cursor Bugbot for commit 561b1c6. Bugbot is set up for automated code reviews on this repo. Configure here.

This function still contains `istanbul ignore` comments. Most of these
are unnecessary, and the logic actually ought to be tested.

This commit cleans up these `istanbul ignore` comments, and also adds
new ones to clarify the existing logic. It also renames
`resolveIndexedAccessMethod` to `findClassMethodDeclaration` so that
it's easier to understand the purpose of this method at a glance.
@mcmire mcmire requested a review from a team as a code owner May 29, 2026 16:49
@cryptodev-2s cryptodev-2s merged commit 8b0482f into feat/messenger-docs-site May 29, 2026
375 of 376 checks passed
@cryptodev-2s cryptodev-2s deleted the clean-up-resolve-indexed-access-method branch May 29, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants