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

Usage of Idiomatic TypeScript #63

Open
rightisleft opened this issue Jun 30, 2021 · 0 comments
Open

Usage of Idiomatic TypeScript #63

rightisleft opened this issue Jun 30, 2021 · 0 comments

Comments

@rightisleft
Copy link

Description

The code itself looks very nice and consistent. However, Looking over the code base it looks like we're not using idiomatic typescript. There are no type declarations, we are using string accessors instead of dot notation etc etc. Is there a design theory behind this or are we open to enhancements?

Defining the types that are flowing through the system would make understanding the codebase much easier to document and understand.

Happy to help

type TaskMeta = {status: string, result: any, traceback: any, children: any[], date_done: any, task_id:string};
 ...
  public status(): Promise<string> {
    return this.getTaskMeta()
      .then((meta: TaskMeta) => {
        if (meta) {
          return meta.status;
        } else {
          return null;
        }
      });
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