mobxjs / mobx-angular

The MobX connector for Angular.
MIT License
483 stars 59 forks source link

Using `@observable.ref` and others #58

Closed YarnSphere closed 6 years ago

YarnSphere commented 6 years ago

From reading through the issues, #13 seems to suggest that I should be importing observable, computed, etc. from angular-mobx rather than from mobx in order to allow AoT.

However, this seems to prohibit the use of @observable.ref, @observable.shallow, and all other variants. When using @observable.ref TypeScript complains with:

TS2339: Property 'ref' does not exist on type '(...args: any[]) => any'

I haven't gotten to the point where I need to worry about AoT just yet, as such I'll simply import from mobx directly for now, but I thought this was an issue worth mentioning.

Thank you for your work!

adamkleingit commented 6 years ago

OK so I hope it doesn't cause any problems, but if you do get to AoT and it does - please reopen the issue.

I will make the readme clearer