qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Export platform specific request handlers

Open nnelgxorz opened this issue 2 years ago • 6 comments

What is it?

  • [x] Feature / enhancement
  • [ ] Bug
  • [ ] Docs / tests

Description

Screenshot from 2022-10-22 18-33-13

For a while now, we've had the platform field on available on the RequestHandler type, but the field is typed to unknown and most users are completely unaware that it exists.

This PR exports special RequestHandler* types from the middlewares for users to take advantage of when developing for their specific platform.

Checklist:

  • [x] My code follows the developer guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have made corresponding changes to the documentation
  • [ ] Added new tests to cover the fix / functionality

nnelgxorz avatar Oct 23 '22 00:10 nnelgxorz

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

stackblitz[bot] avatar Oct 23 '22 00:10 stackblitz[bot]

Not sure what's happening with the build error. Is @public not the correct tag for these type exports?

nnelgxorz avatar Oct 23 '22 01:10 nnelgxorz

It's * @alpha

manucorporat avatar Oct 24 '22 09:10 manucorporat

I think it's a great PR!

manucorporat avatar Oct 24 '22 09:10 manucorporat

Thanks. Jeez. Still not building after using alpha tags and running yarn api.update. Not sure what I broke.

nnelgxorz avatar Oct 24 '22 16:10 nnelgxorz

I guess it works better when you run api.update from the project root. Should be good now!

nnelgxorz avatar Oct 24 '22 18:10 nnelgxorz