Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
NEXT-28963 - Fix data handling types
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasLimberg committed Jul 6, 2023
1 parent d3e0a67 commit e989651
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/_internals/serializer/criteria-serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ const CriteriaSerializer: SerializerFactory = () => ({
// @ts-expect-error
serializedData.associations.forEach((association) => {
// Associations need also to be deserialized
// @ts-expect-error
deserializedCriteria.associations.push(customizerMethod(association));
});
// @ts-expect-error
Expand Down
32 changes: 16 additions & 16 deletions src/data/Criteria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,35 +169,35 @@ export function setDefaultValues(options: { page?: number|null, limit?: number|n
}

export default class Criteria {
private page: number | null;
page: number | null;

private limit: number | null;
limit: number | null;

private term: string | null;
term: string | null;

private filters: SingleFilter[];
filters: SingleFilter[];

private ids: string[];
ids: string[];

private queries: Query[];
queries: Query[];

private associations: Association[];
associations: Association[];

private postFilter: SingleFilter[];
postFilter: SingleFilter[];

private sortings: Sorting[];
sortings: Sorting[];

private aggregations: Aggregation[];
aggregations: Aggregation[];

private grouping: string[];
grouping: string[];

private fields: string[];
fields: string[];

private groupFields: GroupField[];
groupFields: GroupField[];

totalCountMode: TotalCountMode | null;

private totalCountMode: TotalCountMode | null;

private includes: Include | null;
includes: Include | null;

constructor(page: number|null = defaultPage, limit: number|null = defaultLimit) {
this.page = page;
Expand Down

0 comments on commit e989651

Please sign in to comment.