Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchResultsDataModel incorrect types #115

Open
Sawtaytoes opened this issue Jul 18, 2023 · 0 comments
Open

SearchResultsDataModel incorrect types #115

Sawtaytoes opened this issue Jul 18, 2023 · 0 comments

Comments

@Sawtaytoes
Copy link

Sawtaytoes commented Jul 18, 2023

The types for SearchResultsDataModel don't match what's coming back.

error TS2339: Property 'url' does not exist on type 'SearchResultsDataModel'.

But in the return data, there's clearly a url property:

  {
    id: 39535,
    type: 'anime',
    name: 'Mushoku Tensei: Isekai Ittara Honki Dasu',
    url: 'https://myanimelist.net/anime/39535/Mushoku_Tensei__Isekai_Ittara_Honki_Dasu',
    image_url: 'https://cdn.myanimelist.net/r/116x180/images/anime/1530/117776.jpg?s=2a0acf851f984a37764e4804120c45ee',
    thumbnail_url: 'https://cdn.myanimelist.net/r/116x76/images/anime/1530/117776.jpg?s=fc275c30b90acd200a730a5fdf2f27f9',
    payload: {
      media_type: 'TV',
      start_year: 2021,
      aired: 'Jan 11, 2021 to Mar 22, 2021',
      score: '8.38',
      status: 'Finished Airing'
    },
    es_score: 2.3884969
  },

There's another related issue, the id is noted as type string, but it's clearly number in the actual data.

@Sawtaytoes Sawtaytoes changed the title Missing url property in SearchResultsDataModel SearchResultsDataModel incorrect types Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant