gcanti / docs-ts

A zero-config documentation tool for my TypeScript projects
https://gcanti.github.io/docs-ts/
MIT License
100 stars 17 forks source link

export from syntax #16

Closed samhh closed 4 years ago

samhh commented 4 years ago

Using export { f } from 'm' syntax with the usual accompanying JSDoc fails with a "missing f documentation" error.

gillchristian commented 4 years ago

All the exports are expected to have a JSDoc comment with at least @since x.y.z tag.

export {
  /**
   * @since 0.1.0
   */
  f
} from 'm'

Not sure if @gcanti is open to customization on this behavior :thinking:

I'm working on a fork that adds support for a config to customize these things: https://github.com/gillchristian/docs-ts-extra (is not published yet but I can publish it if you are interested on using it).

samhh commented 4 years ago

Ahhh that was me being silly then! I was placing it above the statement but of course this makes more sense, cheers.

I don't mind that limitation, it encouraged me to better document my library. :smile: But yeah it did make adoption harder. It'd make adoption virtually impossible for an established, massive library.

gillchristian commented 4 years ago

Glad I was able to help :smile:

It'd make adoption virtually impossible for an established, massive library

Hence my fork :sweat_smile:

samhh commented 4 years ago

Interesting... this causes the generated signature to change from f's type to typeof f :thinking: