You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by teetotum October 14, 2024
The import of type Op is not recognized: Module '"valtio"' has no exported member 'Op'.ts(2305)
What would be the correct import for valtio types?
I'm on valtio 1.13.0
import{subscribe,proxy,typeOp}from'valtio'// ...// const state = ...// ...subscribe(proxy(state),(ops: Op[])=>{// ...})
Since ops are passed into a callback for the user during a subscribe, it would be helpful to export the type that the user can expect. Might be a good idea to rename it to something that explains what it is a bit better as well.
The text was updated successfully, but these errors were encountered:
Discussed in #971
Originally posted by teetotum October 14, 2024
The import of
type Op
is not recognized:Module '"valtio"' has no exported member 'Op'.ts(2305)
What would be the correct import for valtio types?
I'm on valtio 1.13.0
Since ops are passed into a callback for the user during a subscribe, it would be helpful to export the type that the user can expect. Might be a good idea to rename it to something that explains what it is a bit better as well.
The text was updated successfully, but these errors were encountered: