Repository navigation
Return Struct Warnings #301
|
When returning a struct a warning will show if I don't define what the struct contains. Is there support in JSDocs and Stitch to define what parameters the struct contains without having to define a constructor. I'm currently documenting that a function will return Any to mask the problem. |
Replies: 1 comment 6 replies
|
Unfortunately no. I've been avoiding going too far beyond Feather syntax to try to keep as much compatibility with Feather as I can, and at least back when I was writing all of this Feather didn't have a way to document struct contents. I just write the constructors. Since they don't get referenced except as a type I'm pretty sure they don't impact the build anyway. Stitch does prove some jsdoc-like stuff for documenting struct variables within constructors, so you can in effect use empty constructors with comment-generated self variables. I think it's all in the Stitch README (which vscode also shows when you view the extension). |
Unfortunately no. I've been avoiding going too far beyond Feather syntax to try to keep as much compatibility with Feather as I can, and at least back when I was writing all of this Feather didn't have a way to document struct contents.
I just write the constructors. Since they don't get referenced except as a type I'm pretty sure they don't impact the build anyway. Stitch does prove some jsdoc-like stuff for documenting struct variables within constructors, so you can in effect use empty constructors with comment-generated self variables. I think it's all in the Stitch README (which vscode also shows when you view the extension).