Skip to content

Typescript Support #16

@canpacis

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?

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