-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Help 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
π Search Terms
isolatedDeclarations, parameter properties, implicit undefined
π Version & Regression Information
- Present since
isolatedDeclarations
was added in TS5.5
β― Playground Link
π» Code
export class Bar {
constructor(private x?: Array | undefined) {}
}
π Actual behavior
Error:
Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations.
π Expected behavior
Should not give an error since the undefined is already explicit.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Help 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