You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.
Bah, this looks like a @microsoft/api-extractor bug. That definitely shouldn't be happening, but I can still reproduce if I run @microsoft/api-extractor directly.
It looks like you all are doing some pretty complicated typing stuff with generics, and it looks like the bug only occurs when the type is referenced as a generic argument:
When AbstractState is referenced on its own it's properly bundled
When AbstractState is referenced as an argument generic like AsyncState<T, AbstractState<T>>, it includes the broken import('./Async').
Unfortunately I can't find a simple reproduction case, and I don't know enough about the library to know where to start pulling/commenting things out until I don't see it any more. But I'd recommend getting as simple a reproduction case as you can, and then filing an issue here: https://github.com/microsoft/web-build-tools
Since the type does actually exist in the file, a hacky short-term workaround would be to add this after your build to remove the zombie type import: sed -i "" -e "s/import(\".\/Async\").//g" pkg/dist-types/index.d.ts
Wish I had better news! Let me know if you end up filing that bug with microsoft and I'd be happy to jump in there to help as well.
This came up while trying to convert
react-async
to TS. (See async-library/react-async#105 ).We are trying to get a single-file-.d.ts. Unfortunately, using the
plugin-bundle-types
, it seems like the generated file in part references files that are being inlined.See line 220 here: https://gist.github.com/phryneas/d101e7e0b8070f6dc8b44540825c87cd#file-index-d-ts-L220
@FredKSchott could you take a look please?
This was build by running
yarn build:packages
from this branch: https://github.com/phryneas/react-async/tree/switch-to-tsThe text was updated successfully, but these errors were encountered: