sholladay / pogo

Server framework for Deno
Mozilla Public License 2.0
482 stars 32 forks source link

Enhance `deno doc` result #45

Closed afaur closed 4 years ago

afaur commented 4 years ago

Update:

afaur commented 4 years ago

As for mod.ts vs main.ts - yeah, I went against the Deno community's convention on naming this file...

  • I removed the mod.ts files since main.ts is the public entry point for pogo.

I'm relatively new to TypeScript and still trying to get a good feel for what should be public vs private.

  • Initially I thought it would be good to expose everything, but now changed it to what the user should know about.
  • I wasn't able to get Request and Response exposed in a way for deno doc to annotate them.
  • I think this might be possible, but may require an interface for them that gets added to types.ts?

I'm willing to have a mod.ts alias for people who expect it or tools that make assumptions about it

  • The mod.ts probably comes from the mod.rs in rust.

Should add in a follow up PR:

sholladay commented 4 years ago

Sorry about the merge conflicts. I moved some things around while implementing h.directory(). If you could fix the conflict and remove the toolkit interface, in favor of exposing the class like you had it earlier, this will be ready to merge.

afaur commented 4 years ago

No problem. I was able to merge master into this today, and the changes were easy to resolve. I removed the interfaces that I added to types, and then added tookit, request, and response as exports from main. I think this will allow for jsdoc strings on everything that is currently listed here (https://github.com/sholladay/pogo#api).

sholladay commented 4 years ago

This is looking great. I'll try it out when I get to a terminal. Aiming to merge this tonight.