Closed ekhaled closed 2 years ago
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
If you have any suggestions, let me know. Happy to implement it 😄
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
That sounds absolutely fine to me. Are you able to make the relevant commits and update this PR?
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!
@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 🐱
closes #78