Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(es/typescript): Support deferred modifier #9084

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magic-akari
Copy link
Member

@magic-akari
Copy link
Member Author

magic-akari commented Jun 20, 2024

pub struct Function {
pub params: Vec<Param>,

I need to update the type of params from Vec<Param> to Vec<ParamOrTsParamProp>, which will cause a significant amount of changes.

In fact, the introduction of deferred has led to ParamOrTsParamProp appearing more frequently in the TypeScript source code than Param. This nested structure will bring cumbersome matching to the visitor.

Perhaps we have another option, to merge the structures of TsParamProp and Param into one. What do you think? @kdy1

@kdy1 kdy1 self-assigned this Jun 20, 2024
@kdy1 kdy1 added this to the Planned milestone Jun 20, 2024
@kdy1
Copy link
Member

kdy1 commented Jun 20, 2024

Merging the two types sounds good to me

@magic-akari
Copy link
Member Author

I have observed that Babel also distinctly differentiates between TSParameterProperty and Pattern.
It might be necessary to communicate with Babel to explore better implementation methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants