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

fix #78: Add additional metadata for function expressions #79

Merged
merged 9 commits into from
Dec 14, 2021

Conversation

ekhaled
Copy link
Contributor

@ekhaled ekhaled commented Aug 31, 2021

closes #78

@alexprey
Copy link
Collaborator

Hi, thanks for changes! Looks very nice.
However, I not sure about data structure changes in SvelteDataItem, I'm think that it is not a good idea to make that type messy. I need a time to think about that and comeback later

@alexprey alexprey added the enhancement New feature or request label Aug 31, 2021
@alexprey alexprey added this to the 4.0.0 milestone Aug 31, 2021
@ekhaled
Copy link
Contributor Author

ekhaled commented Aug 31, 2021

If you have any suggestions, let me know. Happy to implement it 😄

@alexprey
Copy link
Collaborator

alexprey commented Sep 1, 2021

Ok, I'm thinking on that and that what I think:
Params and return metadata are used in functions, and actually functions can be used anywhere in the JS code: component can have methods, variables can be a function, parameter can be a function, return type also can be a function. And if you look at JSDocType you can see that I already provide additional information about type. So, let to create a new type for JSDocType:

export interface JSDocTypeFunction extends JSDocTypeBase {
    kind: 'function';
    params?: SvelteMethodParamItem[];
    return?: SvelteMethodReturnItem;
}

and update the following:

export type JSDocType = JSDocTypeElement | JSDocTypeConst | JSDocTypeFunction | JSDocTypeUnion;

I think that is a better way to do that. If you have any ideas or points, please mention that, I'm open for discussion

@ekhaled
Copy link
Contributor Author

ekhaled commented Sep 1, 2021

That sounds absolutely fine to me.
Are you able to make the relevant commits and update this PR?

@alexprey
Copy link
Collaborator

alexprey commented Sep 1, 2021

Ok, I'm update your PR and merge it. Try to do it on this week and plan release for the next week.
Thanks for you contribution!

@alexprey alexprey self-assigned this Sep 1, 2021
@alexprey alexprey merged commit c9f72ae into KatChaotic:master Dec 14, 2021
@alexprey
Copy link
Collaborator

@ekhaled thanks for your contribution to that library! Sorry, that I was too much slow to make last fixes and publish the new version of library 🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance function expression metadata
2 participants