Skip to content

JSDoc documentation / sample usage demo on how to correctly document structs #242

Answered by TeunK
TeunK asked this question in Q&A
Discussion options

You must be logged in to vote

Is this constructor global (defined in a Script)? If it's being defined in an Object then it needs a different typename.

Awesome, this solution works! My above examples were written in Obj:Create (both definition and usage). I'd have thought that especially as long as they're in the same location they'd be able to find eachother. But when moving it into a gml script it does seem to work as expected.

In fact, it seems only the type definition needs to be moved to the script, then the usage can refer to it from anywhere, including inside Obj:Create (and anywhere else I'd assume).

I think Stitch will provide it for you if you right-click and "Copy as type" from the context menu

The "Copy…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@TeunK
Comment options

@adam-coster
Comment options

@adam-coster
Comment options

@TeunK
Comment options

Answer selected by TeunK
@adam-coster
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants