-
Notifications
You must be signed in to change notification settings - Fork 622
[api-extractor] Support "export * as __ from __" for local paths #2780
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
Comments
This PR implements what was proposed in microsoft#18587 and exports all named `key` values specified by w3c. Also adds legacy keycode exports as a deep import. Happy to take any suggestions to avoid this. Originallly this was the plan: ```ts export * as keyCodes from './keyCodes' ``` but unfortunately API extractor does not support this syntax microsoft/rushstack#2780
* feat(keyboard-keys): Export keys and legacy keyCodes This PR implements what was proposed in #18587 and exports all named `key` values specified by w3c. Also adds legacy keycode exports as a deep import. Happy to take any suggestions to avoid this. Originallly this was the plan: ```ts export * as keyCodes from './keyCodes' ``` but unfortunately API extractor does not support this syntax microsoft/rushstack#2780 * remove deep export * update fixture
* feat(keyboard-keys): Export keys and legacy keyCodes This PR implements what was proposed in microsoft#18587 and exports all named `key` values specified by w3c. Also adds legacy keycode exports as a deep import. Happy to take any suggestions to avoid this. Originallly this was the plan: ```ts export * as keyCodes from './keyCodes' ``` but unfortunately API extractor does not support this syntax microsoft/rushstack#2780 * remove deep export * update fixture
ran into this issue. Google brought me to the original thread: #1029. And now I'm here. So is this still not supported? My error looks like:
I suspect it's because in my index.ts file I have: export * as CodeGenerator from './codeGenerator'; |
Also, just a note: that's a terribly unhelpful error. Really no information to work off except a desperate Google attempt. |
@octogonz, @iclanton wanted to check-in on this issue. In our package, we want to export the entirety of a file path which are individual constants representing "tokens". This allows folks using bundlers to tree shake out what isn't included or used. With the work around here, that ability isn't available and the error in API extractor means we either need to change our export or we need to export a growing number of individual named constants which are dynamically created...creating a maintenance nightmare. Is there any way this can be prioritized in a coming workstream? Curious about the direction I should take depending on the timeline of getting this working. |
Summary
Issue #1029 and PR #1796 implemented support for this syntax:
But there is a shorthand syntax which was NOT solved by that PR:
This issue tracks the bit of work required to handle the shorthand syntax.
Standard questions
@microsoft/api-extractor
version?CC @Jack-Works @resynth1943 @clar-cmp @jasonswearingen
The text was updated successfully, but these errors were encountered: