ember-concurrency icon indicating copy to clipboard operation
ember-concurrency copied to clipboard

Export types for helpers

Open Techn1x opened this issue 2 years ago • 1 comments

Follows on from this other issue, but it's closed since the author figured out a workaround - but I do think this addon should export types for helpers. https://github.com/machty/ember-concurrency/issues/530

With Glint entering 1.0 and more applications adopting it, it's very useful to export these types as they end up being used in typed glint .gts files.

perform helper being the main example here. The other 2 helpers may not be much of a priority, not sure how widely used they are.

Looks like there's a type file declared here, if it helps! https://github.com/Gavant/glint-template-types/blob/main/types/ember-concurrency/perform.d.ts

Techn1x avatar Jun 30 '23 02:06 Techn1x

I agree, it would be great to have ember-concurrency export the helper types instead of having to rely on @gavant/glint-template-types

bartocc avatar Dec 08 '23 11:12 bartocc

Closing this - I think the types are exported in v4, but regardless the best way is to just use perform directly as a function {{on "click" this.myTask.perform}} or {{on "click" (fn this.myTask.perform "someArg")}}

Techn1x avatar Aug 22 '24 02:08 Techn1x