-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
ES6 Re-exports doesn't resolve inner types #176
Comments
Hey there. This problem has been fixed in v2.0.6 |
@wessberg thank you very much! Just saw an issue tho. The resulting import { FC } from "react";
interface BarProps {
lastName: string;
}
declare const Bar: FC<BarProps>;
declare const __default: typeof Bar; // <== This one
interface HelloWorldProps {
name: string;
}
declare const Foo: FC<HelloWorldProps>;
declare const __default$0: typeof Foo; // <== This one
export { __default as Bar, __default$0 as Foo }; Also seems the watch mode breaks when editing style files. Just updated the sample repo to include postcss. Here is the error that pops up after trying to edit the
|
Hi there. Yes, these are intentional and part of how exported bindings are aliased locally when brought together. The output in your example is exactly as intended. A little verbose, sure, but only something you'll see rarely when re-exporting default exports from other modules under other names. As for the second part of your question about watch mode , I'll look into it and see what if I can make sense if it, but it would be great if we could track it in a separate issue |
sure! I'll open a new one. Thanks! |
I've managed to track down and isolate the problem. It is a regression in the new version. Thanks for letting me know this early before anyone else runs into it! |
That's awesome! and... Oh shut. Just filed a new issue for it #178 You can close it right away. |
That's great, I'll point to that issue in the release notes. |
Hi there! Need some help with this plugin setup as I'm not able to get proper types. Not sure if it's the plugin or a typescript config.
I'm trying to create a react component library with components namely exported from an entry file and each of them re-exported by their own barrel:
And after compiling get two files:
index.js
andindex.d.ts
. But thed.ts
file does not include the inner component types. It's just a single line with an export.Reproduction
By having a project set up like:
Results in a in a
d.ts
file like:But if instead of using re-export use import and then export works fine.
Expected Result
Actual Results
Environment
The text was updated successfully, but these errors were encountered: