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

Typescript API: Interface IAutorunOptions is not exported by mobx.d.ts #1685

Closed
5 of 12 tasks
akloeber opened this issue Aug 15, 2018 · 1 comment
Closed
5 of 12 tasks
Labels

Comments

@akloeber
Copy link

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

I have a:

  1. Question: Feel free to just state your question. For a quick answer, there are usually people online at our Gitter channel
  2. Documentation improvement. Please don't open an issue but create a PR instead!
  3. 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?
  • State the versions of MobX and relevant libraries. Which browser / node / ... version? mobx 5.0.3
  1. Idea:
  • What problem would it solve for you?
  • Do you think others will benefit from this change as well and it should in core package (see also mobx-utils)?
  • Are you willing to (attempt) a PR yourself?

Interface IAutorunOptions is not exported by mobx.d.ts, although it is part of the public API. So in order to use this type it needs to imported with a deep path:

import {IReactionPublic, IReactionOptions, IReactionDisposer, reaction, autorun} from 'mobx';
import {IAutorunOptions} from 'mobx/lib/api/autorun';

It should also be exported by mobx.d.ts so that it can be imported through module 'mobx' like

import {IAutorunOptions} from 'mobx';
@mweststrate
Copy link
Member

Fixed in Mobx 4.3.2 / 5.0.4

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

No branches or pull requests

2 participants