Conversation
| } | ||
|
|
||
| /** | ||
| * @ignore |
There was a problem hiding this comment.
@ignore stops the typedef from getting added to docs.md
|
@josiasds Initial commit with essentially the unchanged code from my demo earlier today. Give it a spin and let me know what you think! |
josiasds
left a comment
There was a problem hiding this comment.
I'm still learning the JSDoc syntax but it makes sense to me.
|
|
||
| /** | ||
| * @ignore | ||
| * @callback SliceSelector |
There was a problem hiding this comment.
I'm not sure I understand the difference between using a @callback tag vs a @typedef. Are both valid options for SliceSelector?
There was a problem hiding this comment.
Typdef doesn't work for functions 😭 .
Refer to https://github.com/LaunchPadLab/client-template/pull/436 for more details. It's a little over my head 😆 😅
There was a problem hiding this comment.
Right. I just re-read the docs.
I thought they were using @typedef to type functions, but it was actually the function params being typed with @typedef. Functions should use @callback.
Work in progress branch to add types to this library (via JSDoc). First iteration will for the most part just be geared toward generating types from existing comments. Subsequent PRs can add enhanced custom types (e.g., things like
SliceSelector) and even possibly generics (if we're feeling wild)