has some problem in Type Inference #773
-
Reproductionhttps://github.com/candy-Tong/pinia-demo I set the Steps to reproduce the behavior
Expected behaviorthere is no typescript error Actual behaviorhas typescript error |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
A few things you can try:
state: () => ({
node: undefined as NodeConfig | undefined,
edge: undefined as EdgeConfig | undefined
}),
return this.edge as EdgeConfig | undefined |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
A few things you can try:
shallowRef
you can simply just define the state similar to the following and it'll still be reactive: