Skip to content

Upgrading to typescript 5.5.x breaks plugin helper typing #597

Closed
@Andr9651

Description

@Andr9651

🐛 The bug

Adding [email protected] to a nuxt/ionic project with helpers exposed via a plugin, results in automatic type information being lost for that plugin. The helper is instead unknown and therefor results in an error when running nuxi typecheck despite it working when running the app.

Steps to reproduce

Open the repro and run npx nuxi typecheck

🛠️ To reproduce

https://stackblitz.com/edit/github-xow1vb?file=plugins%2Ftest.ts

🌈 Expected behaviour

That automatic plugin types work the same as on previous versions of typescript.

Workaround

Manually declare types for plugins as described in the nuxt docs
https://nuxt.com/docs/guide/directory-structure/plugins#typing-plugins

ℹ️ Additional context

As far as I can tell plugin typing still seems to be working for all the other nuxt modules in my project but that might also be because it's manually typed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions