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
Request.getQueryVariables is typed any. There is no current way for usages of @breautek/storm to define and have the typings be enforced.
Unfortunately fixing the typings is not super easy. The @type/express typings for express.Request.query originate from the types for the qs library.
There is some middlemen in the typings but it ultimately maps to qs' ParsedQs.
During a discussion between @breautek and I in slack, it was decided that...
storm only supports what Record<string, string | string[]>
Fixing this issue would require...
Adding a new generic to Request that extends/implements/defaults to Record<string, string | Array<string>>
Updating the return type of getQueryVariables to the new generic. In order to satisfy typings, you will have to force retype this.$request.query by doing <NewGeneric><unknown> this.$request.query
Handler's TGetRequest currently maps to the TBody. This either needs to be updated to map to the query variables generic, or a new generic needs to be added to Handler.
The text was updated successfully, but these errors were encountered:
Request.getQueryVariables is typed any. There is no current way for usages of @breautek/storm to define and have the typings be enforced.
Unfortunately fixing the typings is not super easy. The @type/express typings for express.Request.query originate from the types for the qs library.
There is some middlemen in the typings but it ultimately maps to qs' ParsedQs.
interface ParsedQs { [key: string]: undefined | string | string[] | ParsedQs | ParsedQs[] }
During a discussion between @breautek and I in slack, it was decided that...
Fixing this issue would require...
Record<string, string | Array<string>>
getQueryVariables
to the new generic. In order to satisfy typings, you will have to force retypethis.$request.query
by doing<NewGeneric><unknown> this.$request.query
The text was updated successfully, but these errors were encountered: