Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SearchResultsDataModel incorrect types #115

@Sawtaytoes

Description

@Sawtaytoes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions