Skip to content

Conversation

Bashamega
Copy link
Contributor

@Bashamega Bashamega commented Sep 24, 2025

#2053

NOTE: I didn't migrate methods, because there is still some missing pieces in the parser

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

I have rebased it @saschanaz

...optionalMember("optional", "boolean", child.properties?.optional),
...optionalMember("overrideType", "string", child.properties?.overrideType),
...optionalMember("type", "string", child.properties?.type),
...optionalMember("nullable", "boolean", child.properties?.nullable),
Copy link
Contributor

Choose a reason for hiding this comment

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

nullable belongs to type rather than property itself, so I think this should go to type node (and thus use type node in the patch file too)

@Bashamega
Copy link
Contributor Author

I have updated it to use the type and also refactored the code @saschanaz

@Bashamega
Copy link
Contributor Author

Can you review this @saschanaz ?

};
}

function findTypeNode(children: Node[], context: string): Node | undefined {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the split? I don't find this easier to understand. The code is longer now while the logic is still same, 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.

This is actually shorter @saschanaz, since we now use it for both the method and the property. I factored it out into its own function to keep things DRY.

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