Skip to content

Commit

Permalink
fix(#33): use any as data and metadata key type
Browse files Browse the repository at this point in the history
  • Loading branch information
powilliam committed May 27, 2020
1 parent 3a7b95a commit ba71062
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/utils/ResponseHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,14 @@ interface Required {
code: Code;
}

interface Data {
[key: string]: string;
}

interface Metadata {
[key: string]: string;
}

interface IResponse {
entity?: string;
code?: string;
status?: number;
error?: boolean;
message?: string;
data?: Data;
metadata?: Metadata;
data?: any;
metadata?: any;
}

export class ResponseHandler {
Expand Down Expand Up @@ -114,12 +106,12 @@ export class ResponseHandler {
return this;
}

data(data: Data) {
data(data: any) {
this.response.data = data;
return this;
}

metadata(metadata: Metadata) {
metadata(metadata: any) {
this.response.metadata = metadata;
return this;
}
Expand Down

0 comments on commit ba71062

Please sign in to comment.