Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra write-only property when not expected #197

Open
FransBosuil opened this issue Apr 20, 2023 · 0 comments
Open

Extra write-only property when not expected #197

FransBosuil opened this issue Apr 20, 2023 · 0 comments

Comments

@FransBosuil
Copy link

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

Cannot get abc.id because property id is not readable. [cannot-read]

     419│           ....some((abc) => ids.has(abc.id))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant