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
First of all, thank you for Mirage! It fits my needs exactly. MSW requires an HTTPS connection to host, which was a time-suck and finally a dealbreaker for our S3-hosted staging.
I hit some confusion when I got to the section on dynamic route handlers, specifically: schema.movies.all() versus schema.all('movie')
The first gave me a TS error, the second did not, and because I'm new to Typescript it held me up for a little while. Maybe worth a change to the docs or a change to the types (which I wouldn't know how to do).
Thanks again for a very helpful library!
The text was updated successfully, but these errors were encountered:
Hm – I still am not super familiar with TS, but we might have to ask some of the folks that worked on it.
Back when I first wrote the schema APIs I wanted to mimic Mongo, so schema.movies.all(), schema.movies.where({}), etc. has always been the public API for accessing data.
@dfreeman / @chriskrycho / @zoltan-nz, any chance you know if schema.movies.all() should be valid from Typescript's perspective?
First of all, thank you for Mirage! It fits my needs exactly. MSW requires an HTTPS connection to host, which was a time-suck and finally a dealbreaker for our S3-hosted staging.
I hit some confusion when I got to the section on dynamic route handlers, specifically:
schema.movies.all()
versusschema.all('movie')
The first gave me a TS error, the second did not, and because I'm new to Typescript it held me up for a little while. Maybe worth a change to the docs or a change to the types (which I wouldn't know how to do).
Thanks again for a very helpful library!
The text was updated successfully, but these errors were encountered: