Closed iddan-flycode closed 2 years ago
Ah nice one the optionality might have changed the AST. i'll take a look at this soon.
Out of interest, what behaviour would you expect here for primitive arrays - do you set @Type(()=> String) here or not?
For primitive types I rather not use the @type decorator. I think it should be required only when needed by the library to transform the DTO
On 16 Dec 2021, at 0:40, darraghoriordan @.***> wrote:
Ah nice one the optionality might have changed the AST. i'll take a look at this soon.
Out of interest, what behaviour would you expect here for primitive arrays - do you set @type(()=> String) here or not?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hey!
This is fixed in 3.9.0 - I had to slightly change the way arrays are detected with optional properties.
I added your cases above to the test suite and it all seems ok.
thanks for the bug report!
dar
Thank you 🙏
This code errors with the error:
A non-primitve property with validation should probably use a @Type decorator
while this code doesn't error: