Closed swastik closed 1 year ago
Thanks for your work on this! 😄 I'm trying to type some external addons that provide helpers. For example:
import { HelperLike } from '@glint/template'; declare module '@glint/environment-ember-loose/registry' { export default interface Registry { or: HelperLike<{ Args: { Positional: [any, any] }; Return: any; }>; } }
The helper can be invoked like this and it returns either of the two arguments (for example):
{{#let (or a b) as |foo|}} {{foo}} {{/let}}
However, this seems like it will return an incorrect type: any. Is there a way to type these correctly? Thanks for any help!
any
Thanks for your work on this! 😄 I'm trying to type some external addons that provide helpers. For example:
The helper can be invoked like this and it returns either of the two arguments (for example):
However, this seems like it will return an incorrect type:
any
. Is there a way to type these correctly? Thanks for any help!