- Notifications
You must be signed in to change notification settings - Fork114
Open
Description
Hi, I just want to make sure if this library works well with typescript.
I tried copyingredux-orm-tests.ts to my project, but got the following error from vscode:
Type 'typeof Book' does not satisfy the constraint 'typeof AnyModel'. Types of property 'reducer' are incompatible. Type '(action: RootAction, book: typeof Book) => void' is not assignable to type '(action: any, modelType: ModelType<any>, session: Pick<Pick<Session<any>, never> & Pick<{ [x: string]: ModelType<any>; }, never> & Pick<{ [x: string]: ModelType<any>; }, string | ... 1 more ... | symbol>, string | ... 1 more ... | symbol>) => void'. Types of parameters 'book' and 'modelType' are incompatible. Type 'ModelType<any>' is missing the following properties from type 'typeof Book': prototype, reducer, idAttribute, querySetClass, and 4 more.ts(2344)My tsconfig.json is here:
{ "compilerOptions": { "module": "commonjs", "esModuleInterop": true, "target": "es6", "moduleResolution": "node", "sourceMap": true, "outDir": "dist", "resolveJsonModule": true, "declaration": true, "preserveSymlinks": true }, "include": [ "**/*" ], "exclude": [ "node_modules" ], "lib": [ "es6" ]}typescript version:
typescript@^4.1.2: version "4.1.2"vscode version:
code --version1.51.1e5a624b788d92b8d34d1392e4c4d9789406efe8fx64Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels