Skip to content

Typescript Support #16

Description

@canpacis

At the moment typescript linting tools does not like working with nucleoid. The way I understand this is that when I register a class I get static helper methods on the class in runtime but these do not exist in the code itself, nor their type declarations.

class User {
  constructor(public name: string) {
    this.name = name;
  }
}
nucleoid.register(User);

app.get("/user", () => User.filter(() => /* */));

So something like this will throw an error like Property 'filter' does not exist on type 'typeof User'.

Are you planning to add typescript support?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions