Closed helt closed 1 month ago
What TypeScript version are you using and what does your tsconfig.json
look like?
I tried the same with our e2e setup and the code generated based on our own tsconfig.json
seems valid, also which SWR version have you installed? Maybe there is a mismatch between their types and ours.
{
"compilerOptions": {
"target": "es2015",
"lib": ["dom", "dom.iterable", "esnext"],
"types": ["node", "cypress", "jest"],
"allowJs": true,
"skipLibCheck": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"downlevelIteration": true,
"alwaysStrict": true,
"strict": true,
"plugins": [
{
"name": "next",
},
],
"paths": {
"@/*": ["./src/*"],
},
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": [
"node_modules",
"cypress.config.ts",
"cypress/",
"**/__tests__/**/*.[tj]s?(x)",
"**/*.{spec,test}.[tj]s?(x)",
],
}
It seems that having strict is throwing some errors, something we don't have in the e2e tests. I will merge your pr and enable this on the e2e cases.
"alwaysStrict": true,
"strict": true
@helt This has been fixed as part of the latest v3 alpha :) It took some time but finally have something that works for SWR.
What version of
kubb
is running?No response
What platform is your computer?
wsl
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)No response
What steps can reproduce the bug?
see freshly added oas as in https://github.com/kubb-labs/kubb/pull/1176
generated code:
Details about the issue on
mutationOptions
:How often does this bug happen?
Every time
What is the expected behavior?
no squiggly lines :D
Swagger/OpenAPI file?
in PR
Additional information
No response