jsr icon indicating copy to clipboard operation
jsr copied to clipboard

The documentation should show the possible exceptions when available

Open felds opened this issue 8 months ago • 1 comments

Currently, the generated docs only show generics, parameters and return types. Having the possible exceptions listed could be useful when using a library.

The @throws tag is currently badly supported but this could change if tools made any use of it.

MDN list the possible exceptions under the return types and I think it's a good standard for any documentation. Examples:

  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize#exceptions
  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI#exceptions

felds avatar Jun 07 '24 21:06 felds