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
import{WritableDraft}from"immer/dist/internal";interfaceIFrontend{
... // all the public members here}classFrontendimplementsIFrontend{privateframeworks: string[]=['React','Vue','Angular'];}constfrontend: IFrontend={}asWritableDraft<IFrontend>;
🙋♂ Question
I got a type error when I tried to wrap a class instance that owns private fields. WhatI should I do?
Code Snippet
Expect:
The wrapped type is compatible to the original type
Actual:
Property 'frameworks' is missing in type 'WritableDraft' but required in type 'Frontend'.ts(2741)
setUseProxies(true)
setUseProxies(false)
(ES5 only)The text was updated successfully, but these errors were encountered: