Mobx: about makeAutoObservable

Created on 2 Oct 2020  ยท  2Comments  ยท  Source: mobxjs/mobx

I'm not sure that is your purpose.

documentation

makeAutoObservable
Usage:

makeAutoObservable(target, overrides?, options?)

code

export function makeAutoObservable<T extends Object, AdditionalKeys extends PropertyKey = never>(
    target: T,
    excludes?: AnnotationsMap<T, NoInfer<AdditionalKeys>>,
    options?: CreateObservableOptions
): T {

overrides in documentation, excludes in code

I think overrides and excludes are different. It's confusing.

โ” question

Most helpful comment

thank you for your answering. I will do PR.

All 2 comments

If you can, please PR corrections for such minor inconsistencies when you spot them. In my opinion overrides is more suited since you can in fact override, and not just exclude (false) when using makeAutoObservable.

It was probably meant to get changed, but got overlooked. It's hard to get to zero overall, let alone after a major revision.

thank you for your answering. I will do PR.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kirhim picture kirhim  ยท  3Comments

bakedog417 picture bakedog417  ยท  3Comments

mehdi-cit picture mehdi-cit  ยท  3Comments

hellectronic picture hellectronic  ยท  3Comments

cafreeman picture cafreeman  ยท  4Comments