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

Missing Nitro hooks types declarations #2177

Closed
helltraitor opened this issue Jul 17, 2023 · 0 comments · Fixed by #2655
Closed

Missing Nitro hooks types declarations #2177

helltraitor opened this issue Jul 17, 2023 · 0 comments · Fixed by #2655

Comments

@helltraitor
Copy link

Environment

Reproduction

Add nitro plugin in /server/plugins/ directory:

export default defineNitroPlugin((nitroApp) => {
  nitroApp.hooks.hook('content:file:afterParse', (_file) => {
    // do magic
  })
})

image

Describe the bug

Seems like nitro hooks is missing

Consider to extend NitroRuntimeHooks with the following like code:

declare module 'nitropack' {
  interface NitroRuntimeHooks {
    'content:file:beforeParse': (/* args */) => void
   /* rest */
  }
}

export {}

Additional context

No response

Logs

No response

d0rich added a commit to exactpro/docs-toolkit that referenced this issue Jul 21, 2023
d0rich added a commit to exactpro/docs-toolkit that referenced this issue Jul 21, 2023
* Update dependencies to wanted

* Update dev dependencies to latest

* Update package.json

* Define tsconfig for server

* Workaround for type issue nuxt/content#2177

* Fix ProseCode warns nuxt/content#2111

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

Successfully merging a pull request may close this issue.

1 participant