A class that contains a GetAccessor and a SetAccessor with the same name is converted into a class that contains 2 properties with the same name but with different modifiers. The second modifier is "write-only" which makes the flow check throw a [cannot-read] error because the property is not readable.
Can you please indicate how this can be resolved without touching the typescript file? Thank you.
Inputexport declare class ABC { get id(): string | number; set id(value: number | string); }
A class that contains a GetAccessor and a SetAccessor with the same name is converted into a class that contains 2 properties with the same name but with different modifiers. The second modifier is "write-only" which makes the flow check throw a [cannot-read] error because the property is not readable.
Can you please indicate how this can be resolved without touching the typescript file? Thank you.
Input
export declare class ABC { get id(): string | number; set id(value: number | string); }
Output
declare export class ABC { id: string | number; -id: any; }
Error