adopted-ember-addons / ember-sortable

Sortable UI primitives for Ember.js
https://ember-sortable.netlify.app/
MIT License
298 stars 148 forks source link

fix types for reorder and drag test helpers #587

Closed BoussonKarel closed 2 weeks ago

BoussonKarel commented 3 weeks ago

fixes #586

We can use Parameters<typeof find>[0] because we are passing the selectors to the find function.

  itemSelector: Parameters<typeof findAll>[0],
  ...resultSelectors: Parameters<typeof find>[0][]

or we can just copy their types

  itemSelector: keyof (HTMLElementTagNameMap | SVGElementTagNameMap) | string,
  ...resultSelectors: (keyof (HTMLElementTagNameMap | SVGElementTagNameMap) | string)[]

What's the best / cleanest / preferred method of doing this?

netlify[bot] commented 3 weeks ago

Deploy Preview for ember-sortable canceled.

Name Link
Latest commit b35613c35c004ffe1f4cd9b8a46eec28e41bb7ba
Latest deploy log https://app.netlify.com/sites/ember-sortable/deploys/66f65be0603dbe0008d0038b