Open
Description
In your type definitions, the ObservableSlim.create()
function returns a type ProxyConstructor
. I think this is incorrect. ProxyConstructor
is just a type defined explicitly for the object Proxy
, and all it can do is be constructed, i.e. new Proxy(...)
.
If I run:
let x = {} as MyState
let state = ObservableSlim.create(x, true, changes => {
console.log('State changed', changes);
});
x.y = 3;
I would expect state to be of type MyState
, or possibly object
, but definitely not ProxyConsructor
. I get an error on the last line, even if the type MyState
has a property x
. If you construct a Proxy, it will be of the same type as the first argument, so I think create
should world the same way.
Metadata
Metadata
Assignees
Labels
No labels