Skip to content

Better typescript types #252

@D-Sketon

Description

@D-Sketon

Check List

  • I have already read README.
  • I have already searched existing issues.
  • I have already searched existing pull requrests.

Feature Request

There are still some problems with the current type labeling for warehouses. For example:

get(fn: (this: T) => any): SchemaTypeVirtual<T> {

Actually, it should be:

get(fn: (this: Document<T>) => any): SchemaTypeVirtual<T> {}

However, it is difficult to refactor the type due to the following implementations:

constructor(data?: T) {
if (data) {
Object.assign(this, data);
}
}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions