Skip to content

[api] Add GenericType type - #64190

Open
Tom Mrazauskas (mrazauskas) wants to merge 1 commit into
microsoft:mainfrom
mrazauskas:add-GenericType
Open

[api] Add GenericType type#64190
Tom Mrazauskas (mrazauskas) wants to merge 1 commit into
microsoft:mainfrom
mrazauskas:add-GenericType

Conversation

@mrazauskas

Copy link
Copy Markdown
Contributor

Fixes #64189

This PR adds the missing GenericType type.

Signed-off-by: mrazauskas <tom@mrazauskas.de>
Copilot AI balanced review requested due to automatic review settings September 7, 2026 17:26
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Sep 7, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 7, 2026
}

/** Generic types */
export type GenericType = InterfaceType & TypeReference;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The exact type definition in Strada is:

interface GenericType extends InterfaceType, TypeReference {
}

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The API additions are consistent across both variants and have targeted test coverage.

Pull request overview

Adds the missing GenericType API type and exposes generic targets through TypeReference.getTarget().

Changes:

  • Adds and exports GenericType in synchronous and asynchronous APIs.
  • Narrows getTarget() return types accordingly.
  • Tests access to generic target type parameters.
File summaries
File Description
packages/typescript/src/api/async/types.ts Defines GenericType and updates getTarget().
packages/typescript/src/api/async/api.ts Exports GenericType.
packages/typescript/src/api/sync/types.ts Adds generated synchronous type definitions.
packages/typescript/src/api/sync/api.ts Adds generated synchronous export.
packages/typescript/test/async/api.test.ts Tests asynchronous generic target parameters.
packages/typescript/test/sync/api.test.ts Tests synchronous generic target parameters.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Add GenericType type to the API

2 participants