-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Describe the bug
I use JsonForms in my project and I face a problem to compile Typescript.
-
@jsonforms/react/lib/Renderer.d.ts 17 row
export type StatelessRenderer<P extends RendererProps> = React.StatelessComponent<P>;
Error:TS2694: Namespace React has no exported member StatelessComponent
I`ve solved this error by adding d.ts file and declare React type but it seems like workaround. -
@jsonforms/core/src/util/util.ts 104 row
if (isArray(jsonSchema.type)) {
return jsonSchema.type;
}
Error: TS2322: Type string | string[] is not assignable to type string[]
My typescript config
{
"compilerOptions": {
"target": "es2020",
"module": "es2015",
"declaration": true,
"outDir": "./generated",
"strict": false,
"sourceMap": true,
"jsx": "react-jsx",
"esModuleInterop": true,
"moduleResolution": "Bundler",
"isolatedModules": true,
"moduleDetection": "force",
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src"]
}
There was a lot of TS errors, but I set strict to false and almost everything gone except these two errors
Expected behavior
There is no TS errors
Steps to reproduce the issue
- Set up vite project
- Install "typescript": "~5.6.2", "typescript-eslint": "^8.11.0",
- Install @jsonforms/core @jsonforms/react
- Set TS config that above
- Run tsc
Screenshots
No response
Which Version of JSON Forms are you using?
v3.7.0
Package
Core
Additional context
No response
Reactions are currently unavailable