-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Default assigned generic type isn't generated #186
Comments
@wessberg Do you know what or where the issue could be? I would be willing to fix it. |
@wessberg I would also be willing to fix it, if you could provide some insights of what you think where the issue could be. Your plugin is really good! |
It seems like the default type is preserved if you use |
I face the same issue too, with dependency versions: export type Dict<Value = string> = { [key: string]: Value }; was built to type Dict<Value> = {
[key: string]: Value;
}; The default type parameter was stripped away. It doesn't happen when running |
if you're blocked by this, try typescript 4.6. It worked for us! |
Thanks @tihuan, as you suggested, but instead of downgrading, I upgraded to "typescript": "4.8.2" and now it works.
|
tsc
(if applicable): YesReproduction
I have two files:
index.ts
andSomeElse.ts
:The input for rollup is the
index.ts
file.Note: if the input file would be
SomeElse.ts
(so the re-export isn't happening) the output would be correct.Not very familiar with repl, but here is a link: https://replit.com/@KingSora/rollup-plugin-ts-bug
The setup is actually really small, please just re-create it on your local machine if needed.
Run
npm run build
to build the output.Expected Behavior
The type is exported correctly:
Actual Behavior
The type is exported without the default assigned type
any
:The text was updated successfully, but these errors were encountered: