Skip to content

Conversation

@Bashamega
Copy link
Contributor

fixes #2114

@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.

@Bashamega
Copy link
Contributor Author

What do you think @lgarron

function handleMultipleTypes(
typeNodes: Node[],
returns?: Value,
): DeepPartial<Typed> | DeepPartial<Typed>[] | undefined {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's DeepPartial<Typed> | undefined, no? It never returns an array.

And this function should be called handleTyped and the singular version should be called handleSingleTypeNode or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Bashamega Bashamega requested a review from saschanaz December 21, 2025 10:37
...optionalMember("overrideType", "string", child.properties?.overrideType),
...(typeNode
? handleTyped(typeNode)
? handleSingleTypeNode(typeNode)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why? properties can have union types too. handleSingleTypeNode should not be called outside handleTyped.

const subType =
type.children.length > 0 ? handleTyped(type.children[0]) : undefined;
type.children.length > 0
? handleSingleTypeNode(type.children[0])
Copy link
Collaborator

Choose a reason for hiding this comment

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

And subtypes can be union too

@Bashamega Bashamega requested a review from saschanaz December 21, 2025 13:08
@Bashamega
Copy link
Contributor Author

Done


function handleTyped(
typeNodes: Node[],
returns?: Value,
Copy link
Collaborator

Choose a reason for hiding this comment

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

returns? you mean property?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I forgot to include it i will fix it

Copy link
Collaborator

Choose a reason for hiding this comment

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

You still forgot this

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 have renamed it

@Bashamega
Copy link
Contributor Author

Better?

@Bashamega Bashamega requested a review from saschanaz December 21, 2025 13:39
@Bashamega
Copy link
Contributor Author

Is there any thing missing here @saschanaz

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.

.toJSON() on PublicKeyCredential effectively returns any

2 participants