e2corporation commented on issue #3335: URL: https://github.com/apache/incubator-devlake/issues/3335#issuecomment-1272543792
@likyh You create a "refactor" ticket that starts off like this: > I think no one knows what the type of configuredProject here, including the writer So you're saying that **nobody** knows, including _me_ the writer/author, how this code works? When It's well established that `configuredProject` will either be null or an **ideally** an instance of an applicable project model (`GitlabProject`, `GitHubProject`) etc. You should already be aware that user-controlled actions dictate when a "configured" project or board is set in most cases. There is no "unknown" behavior happening here causing any confusion as to what a configured project's state might be. > We need a definite type for object data. The Project-type data models already created, serve this purpose, and clearly define the structure of the project/board object as all project-type models will share similar properly traits, with the `variant` property being used to distinguish between _project_ and _board_ when necessary. I previously discussed that configured board and project props will be consolidated into one variable at some point, namely `activeProjectRecord` or `activeProjectEntity`. (You have logged another refactor ticket regarding that) TypeScript is still on the future roadmap, but TS isn't the issue here. This ticket is more of a question on behavior of how configured projects are established, not so much a valid reason to adopt typescript. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
