motorcycle.ts
motorcycle.ts copied to clipboard
Type 'EventMap[K]' does not satisfy the constraint 'Event'
When trying the counter example I get the following with the latest version of typescript installed:
ERROR in .../motorcycle.ts/examples/counter/node_modules/mostly-dom/lib/types/VNodeEventTypes.d.ts (7,54): error TS2344: Type 'EventMap[K]' does not satisfy the constraint 'Event'. webpack: Failed to compile.
Any clues?
Updating dependencies worked. Other examples are broken as well and require code changes.
Hmmm...what dependencies? Can you paste your package.json? Thnx!
yarn outdated
tells you what can be updated.
"dependencies": {
- "@motorcycle/dom": "16.0.0",
- "@motorcycle/mostly-dom": "4.0.0",
- "@motorcycle/run": "4.0.0",
- "@motorcycle/stream": "2.0.0"
+ "@motorcycle/dom": "17.0.0",
+ "@motorcycle/mostly-dom": "5.0.0",
+ "@motorcycle/run": "5.0.0",
+ "@motorcycle/stream": "3.0.0",
+ "@typed/prelude": "5.0.0",
+ "typescript": "^2.9.1"
},
"devDependencies": {
- "@types/node": "8.0.28",
- "ts-loader": "2.3.7",
- "webpack": "3.5.6",
- "webpack-dev-server": "2.7.1"
+ "@types/node": "10.3.2",
+ "ts-loader": "4.4.1",
+ "webpack": "4.12.0",
+ "webpack-cli": "^3.0.4",
+ "webpack-dev-server": "3.1.4"
}
Thanks! :)
I still get this message when I run my tests with @typed/[email protected]
. Has @typed/test
been replaced by something new?
node_modules/@motorcycle/mostly-dom/node_modules/mostly-dom/lib/types/VNodeEventTypes.d.ts
(7,54): Type 'EventMap[K]' does not satisfy the constraint 'Event'.
What can I do about this error mesage?