Defining Pagination Parameters with Effect Typescript and SQL Integration
Is there a better way to define something like this:
This is a struct that is exposed to the API's url params for certain routes. Though I noticed that if I feed the same struct to my
Even though the limit and offset will never be undefined. Just wondering if I'm missing something.
PS: If I infer the type of the PaginationParams struct with
This is a struct that is exposed to the API's url params for certain routes. Though I noticed that if I feed the same struct to my
@effect/sql repo in the Request part, the parameters in the execute callback are not inferred as number but as string | undefined. Even though the limit and offset will never be undefined. Just wondering if I'm missing something.
PS: If I infer the type of the PaginationParams struct with
typeof PaginationParams.Type, both fields get inferred correctly as just number