-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat: type nitro app runtime hooks #1316
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1316 +/- ##
==========================================
+ Coverage 77.00% 77.03% +0.03%
==========================================
Files 68 68
Lines 6848 6859 +11
Branches 686 686
==========================================
+ Hits 5273 5284 +11
Misses 1574 1574
Partials 1 1
|
@@ -16,3 +19,11 @@ declare module "h3" { | |||
$fetch: typeof globalThis.fetch; | |||
} | |||
} | |||
|
|||
export interface RuntimeNitroHooks { | |||
"render:response": ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's "render:html" too right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite right! But that is Nuxt-specific and so Nuxt would augment this interface with that hook, as well as the island render hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ππΌ
Just FYI, I picked previous interface name to align with Nuxt's |
π Linked issue
nuxt/nuxt#21593 (comment)
β Type of change
π Description
This addresses a TODO comment to allow nitroApp hooks to be typed (and extended via module augmentation).
π Checklist