Skip to content
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

Type 'EventMap[K]' does not satisfy the constraint 'Event' #311

Open
mspoulsen opened this issue Jun 1, 2018 · 5 comments
Open

Type 'EventMap[K]' does not satisfy the constraint 'Event' #311

mspoulsen opened this issue Jun 1, 2018 · 5 comments

Comments

@mspoulsen
Copy link

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?

@elbaro
Copy link

elbaro commented Jun 12, 2018

Updating dependencies worked.
Other examples are broken as well and require code changes.

@mspoulsen
Copy link
Author

Hmmm...what dependencies? Can you paste your package.json? Thnx!

@elbaro
Copy link

elbaro commented Jun 13, 2018

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"
   }

@mspoulsen
Copy link
Author

Thanks! :)

@mspoulsen
Copy link
Author

mspoulsen commented Jun 29, 2018

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?

@mspoulsen mspoulsen reopened this Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants