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

Generate API documentation #87

Open
hildjj opened this issue Apr 19, 2021 · 3 comments
Open

Generate API documentation #87

hildjj opened this issue Apr 19, 2021 · 3 comments

Comments

@hildjj
Copy link
Contributor

hildjj commented Apr 19, 2021

Some combination of jsdoc, tsc, tsdoc, and/or dts-gen.

Separate, related goal: generate .d.ts file, rather than hand-coding

@StoneCypher
Copy link
Contributor

Separate, related goal: generate .d.ts file, rather than hand-coding

So here's a topic

There exists a tool called dts-gen that can do this without typescript. However, it's pretty broad: it'll give fairly minimal type bindings.

If on the other hand you let typescript do this, you get a much stronger type file, but need to get peggy through tsc once first

I guess if it were up to me, I'd slap dts-gen on it now with the intention of switching to better results from tsc down the road, assuming that'd be a little bit of work

Thoughts?

(also should this be a different issue?)

@hildjj
Copy link
Contributor Author

hildjj commented Apr 22, 2021

I think this is the same issue. I'll do a PR for the tsc approach since I've used it before. You do one for dts-gen, then let's compare them and see what we like?

Are we both going to need the same jsdoc type annotations? Maybe we should do that first together.

@StoneCypher
Copy link
Contributor

I'll do a PR for the tsc approach since I've used it before. You do one for dts-gen, then let's compare them and see what we like?

i mean if you're doing it through tsc then that's the good way and there's no reason for the dts-gen way

dts-gen is just a stop-gap. if tsc is already working, it should be that

.

Are we both going to need the same jsdoc type annotations? Maybe we should do that first together.

They both consume the same annotations.

If it's tsc driven, typescript will already know what a lot of them are from static analysis

Personally, I'm going to make an investigation of how much work it would actually be to convert peggy itself to TS. I know, nobody has agreed that that's the right thing to do yet; I just want to sniff around and see what I think.

Obviously, it would need to be delivered as JS at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants