Mobx: Mobx 5.8.0 build error, downgrade to 5.7.0 fixed my problem

Created on 13 Dec 2018  Β·  8Comments  Β·  Source: mobxjs/mobx

I have an issue:
Mobx 5.8.0 Build Error

../../node_modules/mobx/lib/api/flow.d.ts:9:62 - error TS2370: A rest parameter must be of an array type.
export declare function flow<T, U extends any[]>(generator: (...args: U) => FlowIterator<any>): (...args: U) => CancellablePromise<T>;

image

Downgrade to 5.7.0 fix my problem.

Hope to fixed this problem;

Most helpful comment

Hi there,
I've just recently come across this issue as well.
So looks like the solution here is to upgrade TS to 3?

should this change have been a minor version bump then?
(fwiw upgrading to TS3 has caused me no issues, but just seems weird that a minor bump would require a major version update of another package)

All 8 comments

Looks like you are on TypeScript 2, consider upgrading to 3 (in my
experience the impact is very minor).

Op do 13 dec. 2018 om 09:11 schreef 万千钧 notifications@github.com:

I have an issue:
Mobx 5.8.0 Build Error

../../node_modules/mobx/lib/api/flow.d.ts:9:62 - error TS2370: A rest parameter must be of an array type.
export declare function flow): (...args: U) => CancellablePromise;

[image: image]
https://user-images.githubusercontent.com/18662395/49924497-74813b80-fef1-11e8-8d17-21823904497b.png

Downgrade to 5.7.0 fix my problem.

Hope to fixed this problem;

β€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1843, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABvGhNL7m7o5tox6T2J0TJZEfTqbcBBrks5u4gungaJpZM4ZRH5q
.

Actually under TypeScript 3.2.1. There's still an error when running yarn run quick-build. πŸ˜…

src/api/flow.ts:25:86 - error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'U'.

25         const gen = action(`${name} - runid: ${runId} - init`, generator).apply(ctx, args)
                                                                                        ~~~~


Found 1 error.

error Command failed with exit code 2.

TS: 3.2.1
Mobx: 5.8.0

@fi3ework fixed and pushed (was introduced by a non-optimal merge order). But note that that issue is completely unrelated to the issue reported in this thread, so for future questions on that one please open a new issue.

My bad, ack πŸ˜…

Thx~

Hi there,
I've just recently come across this issue as well.
So looks like the solution here is to upgrade TS to 3?

should this change have been a minor version bump then?
(fwiw upgrading to TS3 has caused me no issues, but just seems weird that a minor bump would require a major version update of another package)

That is a good question, semver doesn't really capture changes in tool or
peer dependencies. So in the MobX repositories for now we followed the most
common best practice used by other TypeScript based projects: a minor
update (there are no breaking api's, semantics or migration guides, but a
peer dependency upgrade (in this case TS) is required, as stated in the
changelog)

Op wo 26 dec. 2018 om 21:41 schreef Nathan Hsieh notifications@github.com:

So looks like the solution here is to upgrade TS to 3?

should this change have been a minor version bump then?

β€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx/issues/1843#issuecomment-450023373, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABvGhJYuIPwDnkk8lfbWa0wSVQlfxSZtks5u898LgaJpZM4ZRH5q
.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.

Was this page helpful?
0 / 5 - 0 ratings