You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And if I remove // @ts-ignore, then there will be errors like this everywhere:
Cannot invoke an object which is possibly 'undefined'.ts(2722)
This expression is not callable.
Not all constituents of type 'ObjectHook<(this: TransformPluginContext, code: string, id: string, options?: { ssr?: boolean | undefined; } | undefined) => TransformResult | Promise<...>>' are callable.
It looks scary, doesn't it?
So I want to know how to make sure that there are no such errors in the tests, and can you advise me a Plugin type that will not give such errors when calling hooks and I would not have to add // @ts-ignore ?
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
This discussion was converted from issue #20071 on May 21, 2025 01:36.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I'm currently working on the
vitepress-plugin-llms
plugin for VitePress, and to make testing easier, I added tests from the very beginningAnd that's great, it's thousands of times faster than running
bun run docs:build
every time and manually checking everythingBut here's the problem - in order to avoid errors in the tests, I constantly have to add
// @ts-ignore
above each plugin hook, here's an example:And if I remove
// @ts-ignore
, then there will be errors like this everywhere:It looks scary, doesn't it?
So I want to know how to make sure that there are no such errors in the tests, and can you advise me a
Plugin
type that will not give such errors when calling hooks and I would not have to add// @ts-ignore
?Thanks in advance
Reproduction
.
Steps to reproduce
No response
System Info
Used Package Manager
bun
Logs
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions