Skip to content

Commit

Permalink
fix(types): fix typing errors and limitations (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-gilliotte authored Sep 8, 2021
1 parent fc10f8d commit a594f78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ interface RecordsSerialized {
}

export class AbstractRecordTool<M extends Sequelize.Model> {
constructor(model: Sequelize.ModelCtor<M>, user: User, query: Record<string, any>)
constructor(model: Sequelize.ModelCtor<M>, user: User, query: Query)
serialize(records: M | M[]): Promise<RecordsSerialized>;
}

Expand Down Expand Up @@ -144,7 +144,7 @@ export class RecordsRemover<M extends Sequelize.Model> extends AbstractRecordToo

export class RecordSerializer {
constructor(model: { name: string } | Sequelize.ModelCtor<any>, user?: User, query?: Query);
serialize(records: Record<string, any> | Record<string, any>[]): Promise<RecordsSerialized>;
serialize(records: Record<string, any> | Record<string, any>[], meta: Record<string, any>): Promise<RecordsSerialized>;
}

// Everything related to Forest permissions
Expand Down Expand Up @@ -205,7 +205,7 @@ export interface Query {
search?: string;
fields?: {[key: string]: string};
sort?: string;
filters?: Filter|AggregatedFilters;
filters?: string
page?: Page;
searchExtended?: string;
}
Expand Down Expand Up @@ -272,6 +272,7 @@ export interface SmartActionField {
defaultValue?: any,
reference?: string,
hook?: string,
widget?: string;
}

export interface SmartActionHookField extends SmartActionField {
Expand Down

0 comments on commit a594f78

Please sign in to comment.