Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Documentation #1409

Closed
jshbrntt opened this issue Nov 23, 2018 · 7 comments
Closed

API Documentation #1409

jshbrntt opened this issue Nov 23, 2018 · 7 comments

Comments

@jshbrntt
Copy link

I would really appreciate some API Docs for this library I've had to go through and read the source in order to know what options can be supplied to the Swagger client factory.

@bestmike007
Copy link

@shockey how about adding typescript definition for this module? I wonder if there's someone already working on this.

@shockey
Copy link
Contributor

shockey commented Jan 4, 2019

@bestmike007, I don't know of any efforts to do this, but if it's something that's testable (assert: do the TS definitions match what we're exporting at any given time?) it sounds like a great enhancement 😄

@bestmike007
Copy link

I think there are two ways of doing this:

  1. Add a TS definition file: need more work to ensure it's consistent with what's exported, and additional tests for that
  2. Translate the code into typescript: generated definitions from code, one source of truth, but everything will be changed

I prefer the latter option if it's okay with the team and planned in a new release.

@shockey
Copy link
Contributor

shockey commented Jan 15, 2019

@bestmike007, we aren't in a position to accept a TypeScript rewrite at this time, but a definition file would be great.

We may explore a TS rewrite at a later time.

@cspotcode
Copy link

Typescript 3.7 allows generating .d.ts files directly from .js. This means you can annotate your .js with comments to declare types, and tsc can create .d.ts declarations from there.

Then you can gradually port the codebase to .ts proper, which has a better syntax for describing types.

TypeScript 3.7 is currently in beta and a stable release is scheduled for November.

@char0n
Copy link
Member

char0n commented Apr 20, 2020

Created first PR that should increase the documentation coverage and quality of our documentation. I've started with a Swagger specification resolver.

@char0n
Copy link
Member

char0n commented Apr 30, 2020

Documentation has been consolidated into docs/ directory.

If you wish to provide a TypeScript typings for this library, please create a separate issue for that.

@char0n char0n closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants