Skip to content

Conversation

@michaldudak
Copy link
Owner

No description provided.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/typescript-api-extractor@2

commit: 1975852

@michaldudak michaldudak requested a review from Copilot June 11, 2025 10:49
Copy link

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 aims to improve the handling of type aliases and enhance consistency throughout type resolution.

  • Added explicit alias names (e.g. "TupleType", "NamedTupleType", "Parameters") in test output JSON files to better represent type aliases.
  • Refactored parser functions (resolveType, parseProperty, parseObjectType, etc.) to remove redundant parameters and streamline type resolution.

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/tuples/output.json Added alias names for tuple types.
test/ts-utility-types/output.json Added alias name "Parameters".
test/react-refs/output.json Updated reference nodes to include "React" in parentNamespaces.
test/namespaces/output.json Added/updated alias names and namespaces for union types.
test/namespaces/input.tsx Introduced type alias "NamespacedType" for improved alias usage.
test/mui-overridable-component/output.json Altered alias names for CSS-related types.
test/hook-/.json Updated react ref alias handling.
test/generics-closed/* Introduced deeper alias handling in generics tests.
test/base-ui-component/output.json Renamed alias from "GenericHTMLProps" to "Props".
test/arrays/output.json Specified alias name "Array" for array outputs.
test/aliases/* Added tests for alias resolution and record type handling.
src/parsers/typeResolver.ts Removed redundant "name" parameter and centralized alias logic.
src/parsers/propertyParser.ts Updated resolveType calls with typeNode when available.
src/parsers/objectParser.ts Refactored property filtering and naming consistency.
src/parsers/functionParser.ts Updated resolveType usage in function signature parsing.
src/parsers/exportParser.ts Removed redundant name references in export parsing.

@michaldudak michaldudak marked this pull request as ready for review June 11, 2025 17:40
@michaldudak michaldudak merged commit 4c04651 into main Jun 11, 2025
2 checks passed
@michaldudak michaldudak deleted the type-aliases branch June 11, 2025 17:40
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.

2 participants