Skip to content

Conversation

@KarishmaGhiya
Copy link
Member

  • adding interface generator

@KarishmaGhiya KarishmaGhiya marked this pull request as ready for review January 6, 2026 19:27
Copilot AI review requested due to automatic review settings January 6, 2026 19:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an interface token generator to the js-api-parser tool, enabling the APIView parser to process TypeScript interface declarations. The implementation follows the existing pattern established by enum and function generators, with comprehensive test coverage.

Key Changes:

  • Adds interface token generator with support for type parameters, constraints, and heritage clauses
  • Refactors shared helper functions from the function generator into a common helpers module
  • Includes extensive test coverage with 18 test cases covering various interface scenarios

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/apiview/parsers/js-api-parser/src/tokenGenerators/interfaces.ts New interface token generator implementation that handles interface declarations with type parameters and extends clauses
tools/apiview/parsers/js-api-parser/test/tokenGenerators/inteface.spec.ts Comprehensive test suite for the interface generator (note: filename has typo)
tools/apiview/parsers/js-api-parser/src/tokenGenerators/helpers.ts New shared helper module containing common token creation and processing utilities
tools/apiview/parsers/js-api-parser/src/tokenGenerators/function.ts Refactored to use shared helpers, with cleaner type parameter access
tools/apiview/parsers/js-api-parser/src/tokenGenerators/index.ts Updated to register the new interface generator and fix formatting

Copy link
Member

@maorleger maorleger left a comment

Choose a reason for hiding this comment

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

This looks good to me I think, @jeremymeng any concerns?

Would be good to see the diff in APIView staging for a few libraries... coming along well and I love how the refactor is broken down to small chunks!

@jeremymeng
Copy link
Member

Looks good!

Copy link
Member

@maorleger maorleger left a comment

Choose a reason for hiding this comment

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

Just wanted to flag the missing default type - let me know when I should review again 👍

Copy link
Member

@maorleger maorleger left a comment

Choose a reason for hiding this comment

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

🚀

@KarishmaGhiya KarishmaGhiya enabled auto-merge (squash) January 8, 2026 12:45
@KarishmaGhiya KarishmaGhiya merged commit b1d2cef into Azure:main Jan 8, 2026
10 checks passed
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.

3 participants