fix: non-injected array class parameter throws error #530
Labels
status: has PR
Issues which has a related PR closing the issue.
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
If non-injected array parameter exist in class constructor, TypeDI throws error.
Minimal code-snippet showcasing the problem
Expected behavior
If non-injected parameter is not an array, error is not thrown:
A workaround to above failure is to define non-injected parameter with union with another type.
For example,
notInjected: string[] | undefined
instead ofnotInjected?: string[]
The text was updated successfully, but these errors were encountered: