eonarheim / TypeState

A strongly typed finite state machine for TypeScript
http://eonarheim.github.io/TypeState/example/
BSD 2-Clause "Simplified" License
269 stars 28 forks source link

Compile errors with TypeScript 2.4 #18

Closed MattKyle closed 6 years ago

MattKyle commented 6 years ago

I get compile errors when using TypeScript 2.4 that aren't present using 2.3

message: 'Argument of type '(accum: boolean, next: () => boolean) => boolean' is not assignable to parameter of type '(previousValue: boolean, currentValue: (to: T) => boolean, currentIndex: number, array: ((to: T) ...'. Types of parameters 'next' and 'currentValue' are incompatible.' at: '217,90' source: 'ts'

Possibly to do with the "Improved inference for generics". See: http://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-4.html

eonarheim commented 6 years ago

@MattKyle Thanks! That is indeed the problem, I've made a fix please let me know if this works for you in master.

MattKyle commented 6 years ago

Yes, that fixes it. Thanks for the fast response.

On Wed, Jul 19, 2017 at 9:11 PM, Erik Onarheim notifications@github.com wrote:

@MattKyle https://github.com/mattkyle Thanks! That is indeed the problem, I've made a fix please let me know if this works for you in master.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eonarheim/TypeState/issues/18#issuecomment-316575987, or mute the thread https://github.com/notifications/unsubscribe-auth/AKLyHnmJHC18f_jsLSQjgnOQsO8T-kuwks5sPrdvgaJpZM4OdKUN .

eonarheim commented 6 years ago

I'll have some free time soon to cut the new NPM and Bower packages,

Cheers! Erik

On Thu, Jul 20, 2017 at 9:58 AM MattKyle notifications@github.com wrote:

Yes, that fixes it. Thanks for the fast response.

On Wed, Jul 19, 2017 at 9:11 PM, Erik Onarheim notifications@github.com wrote:

@MattKyle https://github.com/mattkyle Thanks! That is indeed the problem, I've made a fix please let me know if this works for you in master.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/eonarheim/TypeState/issues/18#issuecomment-316575987 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AKLyHnmJHC18f_jsLSQjgnOQsO8T-kuwks5sPrdvgaJpZM4OdKUN

.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/eonarheim/TypeState/issues/18#issuecomment-316730225, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlW52D8TvtdR6qAU5AqWlBfJHt3fveIks5sP2sqgaJpZM4OdKUN .

HarryPi commented 6 years ago

Hi, having same issue when downloading with npm. Npm indicates lattest is 1.0.4 and now 1.0.5 where this issue was committed as fix. Thanks.

eonarheim commented 6 years ago

@HarryPi Indeed you are right, I've published 1.0.5 now let me know if you have issues