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

Run yarn run quick-build failed after Mobx use TypeScript 3.0 #1837

Closed
4 of 6 tasks
fi3ework opened this issue Dec 8, 2018 · 1 comment
Closed
4 of 6 tasks

Run yarn run quick-build failed after Mobx use TypeScript 3.0 #1837

fi3ework opened this issue Dec 8, 2018 · 1 comment

Comments

@fi3ework
Copy link
Contributor

fi3ework commented Dec 8, 2018

Welcome to MobX. Please provide as much relevant information as possible!

I have a:

  1. Issue:
  • Provide error messages including stacktrace
  • Provide a minimal sample reproduction. Create a reproduction based on this sandbox
  • Did you check this issue wasn't filed before?
  • Elaborate on your issue. What behavior did you expect?

I tried to yarn run quick-build, but the compilation failed.
This command works fine before 16f8586. It should be caused by the upgrade of TS 3.2.1.

I will try to fix the errors and request a pr. 😆

Here's the error message.

src/api/action.ts:71:55 - error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, any, BabelDescriptor]'.
  Type 'IArguments' is missing the following properties from type '[any, any, BabelDescriptor]': 0, 1, 2, pop, and 26 more.

71         return namedActionDecorator(arg2).apply(null, arguments)
                                                         ~~~~~~~~~

src/api/actiondecorator.ts:44:55 - error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, any, any]'.
  Type 'IArguments' is missing the following properties from type '[any, any, any]': 0, 1, 2, pop, and 26 more.

44         return actionFieldDecorator(name).apply(this, arguments)
                                                         ~~~~~~~~~

src/api/observable.ts:78:42 - error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[Object, string | symbol, (PropertyDescriptor | undefined)?]'.
  Type 'IArguments' is missing the following properties from type '[Object, string | symbol, (PropertyDescriptor | undefined)?]': 0, 1, pop, push, and 25 more.

78         return deepDecorator.apply(null, arguments)
                                            ~~~~~~~~~

src/core/reaction.ts:187:9 - error TS2741: Property '$mobx' is missing in type '() => void' but required in type 'IReactionDisposer'.

187         return r
            ~~~~~~~~

  src/core/reaction.ts:50:5
    50     $mobx: Reaction
           ~~~~~
    '$mobx' is declared here.

src/utils/decorators.ts:105:42 - error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[DecoratorTarget, string, BabelDescriptor | undefined, any?]'.
  Type 'IArguments' is missing the following properties from type '[DecoratorTarget, string, BabelDescriptor | undefined, any?]': 0, 1, 2, pop, and 26 more.

105             return decorator.apply(null, arguments)
                                             ~~~~~~~~~


Found 5 errors.
  • State the versions of MobX and relevant libraries. Which browser / node / ... version?
  • Node - 10.14.1
  • macOS - 10.14 (18A391)
mweststrate added a commit that referenced this issue Dec 11, 2018
fix: type checking error under TypeScript 3.0 (fix #1837)
@lock
Copy link

lock bot commented Jul 21, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 21, 2019
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

1 participant