machty / ember-concurrency-decorators

Task decorators for ember-concurrency 1.x (merged into ember-concurrency 2.0)
MIT License
70 stars 25 forks source link

feat: typescript types #18

Closed buschtoens closed 5 years ago

buschtoens commented 6 years ago

This is a shot at converting ember-concurrency-decorators to TypeScript using ember-cli-typescript, so that we get auto-generated .d.ts files for using the decorators.

This is unfortunately not perfect, because:

This is why all of this is kinda ad-hoc and we need to // @ts-ignore in the tests.

I also need to clean up a little. Everything looks even more messy now and my makeshift types for ember-concurrency suck. 😄

buschtoens commented 5 years ago

Rebased onto latest master. But the generated types suck. 😄 I'll revisit it.

buschtoens commented 5 years ago

Since stage 2 decorators are miles away from TS decorators API-wise, it does not make sense any more to convert this to TypeScript just yet. When decorators are properly supported in TS, I'll revisit this.

In the meantime, I've already provided as manually created index.d.ts.