Skip to content

Conversation

@Bashamega
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

subtype: subType,
...optionalMember("type", "string", typeValue),
subtype:
typeValue == "record" && typeof subType?.type !== "string"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this shouldn't check the type name. We could use this for any parameterized type, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we should, when I removed that check, it broke the output to be:

 readonly links: HTMLCollectionOf<HTMLAnchorElement, HTMLAreaElement>;

Instead of the original:

readonly links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh no, ambiguate way to pass second type vs union. We need to disambiguate it rather than using the same way here then.

@Bashamega
Copy link
Contributor Author

What do you think of the idea of adding the union property, like how I did it in the last commit?

@Bashamega Bashamega requested a review from saschanaz January 11, 2026 12:03
@saschanaz
Copy link
Collaborator

How do we handle record<DOMString, (some union type)> in that case?

@Bashamega
Copy link
Contributor Author

How do we handle record<DOMString, (some union type)> in that case?

I have searched the JSONC files and there is nothing like this. If there is an extremely rare case when this is needed, we can use overrideType

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