Hexagon
Hexagon•2y ago

Two questions on documentation

RTFM in 3... 2... 🙂 Question 1: How do i hide documentation for specific exports, i do not want to document exports of dependencies, like https://deno.land/x/entsoe_api_client@0.5.1/deps.ts . I tried /** @ignore */ to no avail Question 2: Is it possible to get some sort of generic description for a file, like: https://deno.land/x/entsoe_api_client@0.5.1/mod.ts , similar to the docs that appear if i click on a function, like https://deno.land/x/entsoe_api_client@0.5.1/mod.ts?s=Query
13 Replies
ioB
ioB•2y ago
For number 2: I recommend looking at the docs for other modules to see how they look. I discovered that https://deno.land/std@0.176.0/archive/mod.ts has the generic description you were looking for and discovered that it did
/**
* Provides a `Tar` and `Untar` classes for compressing and decompressing
* arbitrary data.
*
* @module
*/
/**
* Provides a `Tar` and `Untar` classes for compressing and decompressing
* arbitrary data.
*
* @module
*/
to show that description. I haven't looked at #1 yet but that sounds like it would be solvable, I just haven't found a solution yet. I'm not sure if I understand #1, why do you want to hide the documentation for dependencies?
Hexagon
HexagonOP•2y ago
Oh, cool. Will have a look at the archive module I don't think documenting the dependencies add any value (as they're not exported to be used by a third party). It just become a duplicate of the original packages documentation.
crowlKats
crowlKats•2y ago
we currently dont have a way to disable documentation for a file
ioB
ioB•2y ago
I think the question was
How do i hide documentation for specific exports
Which is subtly different. I feel like I remember seeing this functionality at some point but I may be completely wrong. Also this is definitely an XY problem type of question
crowlKats
crowlKats•2y ago
ok let me be more generic: there is no way to hide documentation of any kind at all currently as far as i remember
ioB
ioB•2y ago
Ah okay, I guess my intuition was wrong. Thanks for clarifying.
Hexagon
HexagonOP•2y ago
Cool guys, question #2 solved, turned out pretty awesome (grammar excluded 🥸 )
/**
* Main entrypoint of entsoe_api_client.
*
* Exports all functions and interfaces that is indended for public use.
*
* @module entsoe_api_client
* @author Hexagon <hexagon@GitHub>
* @license MIT
*/
/**
* Main entrypoint of entsoe_api_client.
*
* Exports all functions and interfaces that is indended for public use.
*
* @module entsoe_api_client
* @author Hexagon <hexagon@GitHub>
* @license MIT
*/
What standard do deno doc use for typescript, is it tsdoc? I notice that types are extracted just fine when writing jsdoc without types. With that info, i could figure out a decent feature request for exclusion 🙂
crowlKats
crowlKats•2y ago
yea, it is mostly based on tsdoc, but with additional features taken from jsdoc (as tsdoc is quite feature-lacking) its just a matter of implementing an ignore tag; should be fairly easy @iobdas maybe something you'd wanna do :P?
ioB
ioB•2y ago
Fine. I'll look into it.
crowlKats
crowlKats•2y ago
lol, if you dont want, dont have to
Hexagon
HexagonOP•2y ago
😅 Thanks guys!
ioB
ioB•2y ago
It's too late... you put me on the spot <:blob_confounded_face:1040664030001508372>
crowlKats
crowlKats•2y ago
lol if you need any pointers, let me know