It's possible to dynamically generate type annotation by simply analyze an object properties, example an object like:
cons myObj = {
start() { /*...*/ },
}
I want to generate/return the follow type:
type Props = {
start: () => void;
isScreenStart: () => boolean;
isStartAllowed: () => boolean;
}
Given a property like advance, it should generate the follow types
advance: () => void;
isScreenAdvance: () => boolean;
isAdvanceAllowed: () => boolean;