Table interface definitions #1652
Replies: 1 comment
-
I also would like a feature like that. As far as I know it's not possible, but I did suggest an idea for a similar feature: #1602 I was thinking more about inadvertently introducing additional fields, but the same kind of 'exact' types would also check that non-nil fields are always provided. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I'd like to be able to define a type alias to enforce table structures. Let me provide an example:
In the above example I've used the
@class
annotation because it's easiest to express complex table structures by separating field definitions via@field
, although@alias
might be more appropriate.Is it possible to achieve this level of type checking on table structures themselves, or should I use a different approach?
Beta Was this translation helpful? Give feedback.
All reactions