Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Problem since TypeScript 2.7.1 – Type 'M[keyof M]' does not satisfy the constraint 'EventObject<keyof M>' #382

Closed
inad9300 opened this issue Feb 13, 2018 · 9 comments
Milestone

Comments

@inad9300
Copy link

I have a dependency on @dojo/loader version 0.1.1 for testing (I'm using the Intern framework and this seems to be required for some use case). After upgrading to TypeScript 2.7.1 (from 2.6.2), I started to see this exceptions coming from @dojo/core:

node_modules/@dojo/core/Evented.d.ts(32,95): error TS2344: Type 'M[keyof M]' does not satisfy the constraint 'EventObject<keyof M>'.
node_modules/@dojo/core/Evented.d.ts(58,72): error TS2344: Type 'M[K]' does not satisfy the constraint 'EventObject<K>'

This happens when I run intern, but seems to be related with Dojo alone.

@inad9300 inad9300 changed the title Proble since TypeScript 2.7.1 -- Type 'M[keyof M]' does not satisfy the constraint 'EventObject<keyof M>' Problem since TypeScript 2.7.1 -- Type 'M[keyof M]' does not satisfy the constraint 'EventObject<keyof M>' Feb 13, 2018
@inad9300 inad9300 changed the title Problem since TypeScript 2.7.1 -- Type 'M[keyof M]' does not satisfy the constraint 'EventObject<keyof M>' Problem since TypeScript 2.7.1 – Type 'M[keyof M]' does not satisfy the constraint 'EventObject<keyof M>' Feb 13, 2018
@agubler
Copy link
Member

agubler commented Feb 13, 2018

Currently Dojo 2 packages only support up to typescript ~2.6.2

@inad9300
Copy link
Author

Any plan to fix that in the near future?

@agubler
Copy link
Member

agubler commented Feb 13, 2018

It’s an enhancement and it’s on the roadmap but it’s unlikely to be before release candidate and release.

@dylans
Copy link
Member

dylans commented Feb 13, 2018

@inad9300 To be clear, the first release candidate for Dojo 2 is due this week, and the release shortly thereafter (probably 2 more weeks?), and then as soon as 2.0 ships, one of the first items on our list is to update to TS 2.7. So it depends on your definition of near future being 1 week (no) or 1 month (most likely).

@dylans dylans added this to the rc.2 milestone Mar 16, 2018
@inad9300
Copy link
Author

Is a release including this merge scheduled? Thank you!

@agubler
Copy link
Member

agubler commented Apr 11, 2018

Hey @inad9300, @dojo/core has been released with these changes on 0.5.0.

@inad9300
Copy link
Author

inad9300 commented Apr 11, 2018

My question is about @dojo/loader. (Edit Which I guess depends on @dojo/core.)

@agubler
Copy link
Member

agubler commented Apr 11, 2018

@inad9300 dojo/loader does not depend on dojo/core

@inad9300
Copy link
Author

OK, I see it is Intern which is depending on it, which still uses version 0.3.0. Thanks for the update, I'll see with them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants