Export Request and Obj types?
See original GitHub issueHi,
We LOVE itty! Would it be possible to export your types from your .d.ts file? We often do handlers in separate handler files and we’d love to be able to do things like this:
import { Request as IttyRequest } from 'itty-router';
...
async buildSomeResponse(req: IttyRequest): Promise<Response> { ... }
VSCode in particular gets confused with the type of the Request arg, and barking about req.query not existing in an example like the above.
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Get the export object definition from an integrator.io REST API ...
This tutorial sends a GET request to the integrator.io REST API for an example export created in the user interface, in order to...
Read more >export - JavaScript - MDN Web Docs
Every module can have two different types of export, named export and default export. You can have multiple named exports per module but ......
Read more >Exporting object definitions, views, and applications
To export object definitions. In BMC Remedy Developer Studio select File > Export. Export wizard (Click the image to expand it.)
Read more >Declaration file: Export both object and types with same the ...
I'm trying to add types to an existing JS library. I'm typing the library by creating .d.ts files to align with each .js...
Read more >Exporting Objects - Software AG Documentation
Field/Option Description Description
Passwords selected Export passwords.
Passwords not selected Do not export passwords.
with Schedules selected Export schedules (default).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@carlsonorozco @youraerials
Should be exported as of
2.4