JorrinKievit / tmdb-js

A typesafe API wrapper for the TheMovieDatabase API for Node and the Web
10 stars 1 forks source link

Append to response record fix #26

Closed newmoneybigbucks closed 8 months ago

newmoneybigbucks commented 8 months ago

AppendToReponseType had an issue where if you passed undefined to the MoviesGetDetailsReponse (or the other get details response types) as the required generic parameters (if your using a those types on their own) and then trying to use Omit on it the never would get distributed over all the types of the data fields making the type unsuable. I think this is something to do with Record<string, never> being treated as an index signature, and then when Omit does T[P] never gets put in each place, but I am not 100% on why

changeset-bot[bot] commented 8 months ago

🦋 Changeset detected

Latest commit: 722f5370d13f647083f7af2f71c3291b52353bf9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------ | ----- | | tmdb-js-node | Patch | | tmdb-js-web | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

JorrinKievit commented 8 months ago

Thank you!