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

API Extractor not able to parse "import * as __ from __" #9803

Open
marlass opened this issue Nov 17, 2020 · 3 comments
Open

API Extractor not able to parse "import * as __ from __" #9803

marlass opened this issue Nov 17, 2020 · 3 comments

Comments

@marlass
Copy link
Contributor

marlass commented Nov 17, 2020

Current solution for namespaces that we use relies on export * as grouping them.
Different solution is to rely on namespaces provided by TS.

The current solution makes it impossible to use API extractor for finding breaking changes in our API.

We can try if namespaces are usable solution for this case at all or we should completely drop namespacing actions/selectors and expose them directly.

To consider:

  • splitting namespaces in multiple files
  • refactoring (problems, ease of catching errors)
  • namespaces support by API extractor
@marlass marlass added this to the 3.x milestone Nov 17, 2020
@Platonn Platonn changed the title Validate usability of TS namespaces on actions/selectors API Extractor not able to parse "import * as __ from __" Jul 20, 2021
@Platonn
Copy link
Contributor

Platonn commented Jul 20, 2021

It looks that the issue with import * as _ from _ has been fixed recently in PR microsoft/rushstack#1796
(available in 7.17.0 microsoft/rushstack#1029 (comment))

So we should change version referenced in this line:

await exec.exec('npm', ['i', '-g', '@microsoft/api-extractor@^7.12.0']);

And see how the report will change

@Platonn
Copy link
Contributor

Platonn commented Jul 20, 2021

btw. another problem with api-extractor ERROR: The expression contains an import() type, which is not yet supported by API Extractor: also seems to be solved in 7.18.0! See microsoft/rushstack#2140 (comment)

@marlass
Copy link
Contributor Author

marlass commented Oct 19, 2021

Our current setup automatically picked up these changes as 7.18 matches the semver we used in the install.

There are however a couple of things that we can now improve:

  • remove some sections from the generated comments (entry points that can't be analyzed, debugging instructions)
  • cleanup code related to this specific error handling we did for these errors

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

No branches or pull requests

3 participants