lwc
lwc copied to clipboard
Consolidate and expose type helpers
Is your feature request related to a problem? Please describe.
Redundant helper methods
Describe the solution you'd like
Consider whether the type helper functions defined in template-compiler -> estree could be exported and used in other contexts. Some type changes would be required.
Additional context
An example would be: https://github.com/salesforce/lwc/blob/ee2edae09f6e080ccc92703864a463e31b4bb3b3/packages/%40lwc/template-compiler/src/shared/estree.ts#L61
Which could serve as a replacement for the same function in shared.ts if the types were aligned.
This issue has been linked to a new work item: W-17405443
export * as utils in @lwc/template-compiler seems reasonable to me.