An annotation to indicate that a field is read-only #2379
PrincessRTFM
started this conversation in
Ideas
Replies: 2 comments
-
I'd really like this too! I think the parsing side would go around luadoc.lua#L1004 plus it'd probably want an extra field in luadoc.lua#L142. I've not looked into the warning side of things but I suspect that'd be a lot harder. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Similar suggestions are also tracked in the following issues: |
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
-
Lua is commonly used to allow custom scripting of outside environments, by exposing some API to the scripts. In some cases, the exposed API provides read-only fields for things like the current API version, for instance. It would be great if a generated API definition file could include such fields but mark them specifically as read-only to produce an error when code tries to modify the value. For example:
Beta Was this translation helpful? Give feedback.
All reactions