-
Notifications
You must be signed in to change notification settings - Fork 12.8k
tsc with allowJs reports TS9005 error for nested anonymous constructor functions #57523
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
I'm not sure if this is meant to compile successfully but, if I'm reading this correctly, it shows an extra thing that is a bug. If you comment out the nested assignment to the declare function a(): void;
declare class a {
b: any;
} This doesn't seem right because And an extra thing that I observed here, private name for // input
// @target: esnext
function test() {
return class A {
#prop = 10;
};
}
export const a = new (test())();
// dts
export declare const a: {
"__#12@#prop": number;
}; |
Hello, any update on this ? Using yarn4 and prisma, we get stuck as :
This makes me totally blocked and forced to downgrade yarn :(. Any workaround exisiting ? |
Can someone tell what is this problem? |
In my case, |
Uh oh!
There was an error while loading. Please reload this page.
🔎 Search Terms
TS9005: Declaration emit for this file requires using private name '(Anonymous function)'. An explicit type annotation may unblock declaration emit.
🕗 Version & Regression Information
Related to #55172
When 2 separate nested
this
bindings are used within constructor functions, the following error's returned always at the top of the file (this was really annoying to debug 😅)⏯ Playground Link
https://tsplay.dev/NV57Gw
💻 Code
🙁 Actual behavior
Complains
🙂 Expected behavior
Shouldn't complain
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: