Skip to content

Commit fdd4fa8

Browse files
committed
fix: typing of toDTO()
1 parent 08b996e commit fdd4fa8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/types/Model.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DTO } from "./interfaces";
22
export declare class Model {
33
id: string;
44
_type: string;
5-
toDTO<T extends Model = typeof this>(): DTO<T>;
5+
toDTO(): DTO<this>;
66
toJSON(maxDepth?: number): any;
77
toFormData(): FormData;
88
}

src/Model.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export class Model {
55
id!: string;
66
_type!: string;
77

8-
toDTO<T extends Model = typeof this>(): DTO<T> {
8+
toDTO(): DTO<this> {
99
const response: any = { ...this };
1010
delete response._type;
1111

0 commit comments

Comments
 (0)