-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Generated d.ts includes implicit any for recursive typesΒ #55832
Copy link
Copy link
Open
Labels
Domain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesHelp WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Domain: Declaration EmitThe issue relates to the emission of d.ts filesThe issue relates to the emission of d.ts filesHelp WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases
π Search Terms
recursive any noImplicitAny d.ts
π Version & Regression Information
β― Playground Link
playground link
π» Code
π Actual behavior
Any is implicitly introduced in the d.ts:
Note that the local type checking (not using the d.ts) correctly handles this recursive type without introducing "any", and builds fine with noImplicitAny enabled.
π Expected behavior
Either generate something without implicitly introducing
any, or generate an error ifnoImplicitAnyis enabled.In this case, the below code generation for the d.ts would work:
Additional information about the issue
No response