immerjs / immer

Create the next immutable state by mutating the current one

Home Page:https://immerjs.github.io/immer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property 'toSorted' does not exist on type 'WritableDraft<ListType>[]'.ts(2339)

vaynevayne opened this issue · comments

image
   updateList((draft) => {
      return draft.toSorted((a, b) => {
        return a[0].cost_money - b[0].cost_money
      })
    })

Plz follow issue template or issue will be closed. We can't do anything with reports like these.