You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the PaginateConfig interface, when trying to provide values to filterableColumns or select attributes, I cannot get hints about real attributes in the entity, even that PaginateConfig has a required generic type.
And placed just below the name: true, when pressing CTRL+I in VSCode to get hints about other attributes in MeetingEntity, I cannot get the attributes. The definition of PaginateConfig is as follows:
To solve the problem, the | string in both attributes should be removed, as there is no valid way PaginateConfig does not have a type provided and defaulting to string breaks previous Column<T> typing. This also bypasses static analysis for non existing attributes.
I have tried to create a PR with these changes but I'm not allowed to push to the repository.
The text was updated successfully, but these errors were encountered:
@ppetzold can I get your input here. I would guess that the | string is to allow people to bypass the hinting in case the TypeScript compiler can't infer all the valid values?
Perhaps this is stopping some IDEs from autocompleting at all? It is probably due to the problem described here: microsoft/TypeScript#29729 and we could try to use one of the fixes in the thread?
While using the
PaginateConfig
interface, when trying to provide values tofilterableColumns
orselect
attributes, I cannot get hints about real attributes in the entity, even that PaginateConfig has a required generic type.For example, having this:
And placed just below the
name: true
, when pressing CTRL+I in VSCode to get hints about other attributes inMeetingEntity
, I cannot get the attributes. The definition of PaginateConfig is as follows:https://github.com/ppetzold/nestjs-paginate/blob/master/src/paginate.ts#L68
To solve the problem, the
| string
in both attributes should be removed, as there is no valid way PaginateConfig does not have a type provided and defaulting to string breaks previousColumn<T>
typing. This also bypasses static analysis for non existing attributes.I have tried to create a PR with these changes but I'm not allowed to push to the repository.
The text was updated successfully, but these errors were encountered: