nestjs-typeorm-paginate icon indicating copy to clipboard operation
nestjs-typeorm-paginate copied to clipboard

Fix some type mismatch, if there are no links

Open fabicsp opened this issue 3 years ago • 0 comments

Since the links has the following type:

readonly items: PaginationObject[];
readonly meta: T;
readonly links?: IPaginationLinks;

And in some use case you can get the following response: const response = { items: [], meta: { ... }, links: "" }

In the scope of this PR i'm gona totally remove the links property from the response object, because it's an optional property on the type definitions, and nothing to do with empty strings. const response = { items: [], meta: { ... } }.

fabicsp avatar May 06 '22 07:05 fabicsp