We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08b996e commit fdd4fa8Copy full SHA for fdd4fa8
dist/types/Model.d.ts
@@ -2,7 +2,7 @@ import { DTO } from "./interfaces";
2
export declare class Model {
3
id: string;
4
_type: string;
5
- toDTO<T extends Model = typeof this>(): DTO<T>;
+ toDTO(): DTO<this>;
6
toJSON(maxDepth?: number): any;
7
toFormData(): FormData;
8
}
src/Model.ts
@@ -5,7 +5,7 @@ export class Model {
id!: string;
_type!: string;
- toDTO<T extends Model = typeof this>(): DTO<T> {
+ toDTO(): DTO<this> {
9
const response: any = { ...this };
10
delete response._type;
11
0 commit comments