-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
"The inferred type... cannot be named without a reference to {npm package}. This is likely not portable. A type annotation is necessary." #1396
Comments
@komali2 Can you create an example with codeSandbox? First thought is that you are having a tsconfig issue(not related to Kubb). |
Happy to, but it'll take me a bit since it's all nestled within a huge proprietary codebase for now. I'll work on that tomorrow (it's my night right now). For now, here's my tsconfig, just in case:
|
Here's a full openapijson that reproduces the error:
With this tsconfig.json:
And this kubb config:
|
Adding this to the top of every file "fixes" the issue:
It can be added with the
|
@komali2 I tried reproducing the issue but couldn’t replicate the error. I tested a few scenarios to check if it might be related to your |
What version of
kubb
is running?3.05
What platform is your computer?
linux
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)tanstack query: 5.51.23, react: 18,
What steps can reproduce the bug?
Integrate this into an
openapi.json
file:Follow a config similar to this:
Generate.
Open
/src/gen/hooks/stepsHooks/useGetStep.ts
.Observe the following typescript errors:
on this function:
Can be temporarily resolved by adding:
How often does this bug happen?
Every time
What is the expected behavior?
No typescript errors :P
Swagger/OpenAPI file?
linked above
Additional information
No response
The text was updated successfully, but these errors were encountered: