github-url-detection icon indicating copy to clipboard operation
github-url-detection copied to clipboard

Include example URLs in JSDocs

Open fregante opened this issue 3 years ago • 1 comments

It would be good to expose the example/test URLs in the JSDocs:

Screen Shot

I'm not sure how how to do this automatically though:

  • write the test URLs in JSDocs and have the test runner read them (how?!). This has the advantage of "just working" when building it via TS
  • manually extending the types via build, either via typescript transform or via post-build step (gives me a headache just thinking about it)

Something similar was suggested by @kidonng on the RG repo if I remember correctly.

Current situation:

Screen Shot

fregante avatar Aug 04 '22 10:08 fregante

  • have the test runner read them (how?!)

Extracting JSDoc comments also looks like a nightmare: https://github.com/microsoft/tsdoc/blob/8b0d97f06009ab8fe086aed237b2c3a878d9d9e1/api-demo/src/advancedDemo.ts#L255

The alternative of editing the d.ts files in place suddenly looks like a walk in the park.

Edit: I asked in https://togithub.com/microsoft/tsdoc/issues/332

fregante avatar Aug 05 '22 19:08 fregante