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

FouMez picture FouMez  ยท  31Comments

sonaye picture sonaye  ยท  70Comments

fibric picture fibric  ยท  37Comments

creativefctr picture creativefctr  ยท  35Comments

Kukkimonsuta picture Kukkimonsuta  ยท  65Comments