Skip to content

Conversation

Frezc
Copy link

@Frezc Frezc commented Jun 19, 2025

fix #2272

}),
false,
);
}

function getParameterName(node: ts.BindingName, index: number) {
if (node.parent) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (node.parent) {
if (node.parent && node.pos !== -1) {

Programatically created nodes don't have text information.

Copy link
Author

Choose a reason for hiding this comment

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

I don't get why the condition node.pos !== -1 should be added. node.parent should not be sufficient?

alexchexes added a commit to alexchexes/ts-json-schema-generator that referenced this pull request Jun 23, 2025
…argument default

- Work on inferring still in progress, arg with type function is not handled; + see the existing vega#2283
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.

Function parameters without declared types will result in an error: Invalid value used as weak map key
2 participants