cornucopia icon indicating copy to clipboard operation
cornucopia copied to clipboard

Type hints

Open cyannuk opened this issue 3 years ago • 1 comments

Is it possible to implement some kind of type hints for generated types? Something like this:

 --: Author(age?:MyDateTime)

cyannuk avatar Aug 24 '22 08:08 cyannuk

While the suggestion is interesting, it hasn't been implemented because there is no way for Cornucopia to tell what MyDateTime is or how it should convert a OffsetDateTime into a MyDateTime (for example).

The canonical way of doing this in Cornucopia would be to use row-mapping.

We're always keen to try new ideas, so please let me know if I didn't understand your question properly, or you have further proposals regarding this issue.

Cheers!

LouisGariepy avatar Aug 24 '22 17:08 LouisGariepy

@cyannuk Do you still need help with this issue? I don't want to close the issue since I think the idea is interesting, but I might move it to the discussion section because this is not really something we can act upon without further information.

Cheers :smile:

LouisGariepy avatar Aug 28 '22 20:08 LouisGariepy