You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a user, when I use the @type intrinsic to reflect on a type, I'd like to be able to access any docstrings (///) associated with the type.
API sketch:
/// An order made by the userstructOrder{/// A unique UUID
id: str;/// A positive integer////// This docstring has multiple lines/// @default 1
qty: num?;}leto= @type(Order)ifletst=o.asStruct(){assert(st.docs=="An order made by the user");letqtyField=st.fields["qty"];assert(qtyField.docs=="A positive integer\n\nThis docstring has multiple lines");assert(qtyField.docTags["default"]=="1");}
Proposed Solution
No response
Implementation Notes
No response
Component
Compiler
Community Notes
Please vote by adding a 👍 reaction to the issue to help us prioritize.
If you are interested to work on this issue, please leave a comment.
If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
The text was updated successfully, but these errors were encountered:
Use Case
As a user, when I use the
@type
intrinsic to reflect on a type, I'd like to be able to access any docstrings (///) associated with the type.API sketch:
Proposed Solution
No response
Implementation Notes
No response
Component
Compiler
Community Notes
The text was updated successfully, but these errors were encountered: