Skip to content

How to handle a helper and a modifier with the same name? #204

Answered by dfreeman
boris-petrov asked this question in Q&A
Discussion options

You must be logged in to vote

I think this is something we're probably not super likely to officially support, as it's not really clear how to do it in a clean way and this problem goes away with strict mode.

That said, unofficially this is expressible using private APIs. As always, use these at your own risk—these types might change in any Glint release.

// ️⚠️ This code may break at any time! This version is current as of Glint 1.0.0-beta.1

import { ModifierReturn, DirectInvokable } from '@glint/template/-private/integration';
import { ContentValue } from '@glint/template';

declare module '@glint/environment-ember-loose/registry' {
  export default interface Registry {
    'did-insert': DirectInvokable<{
      (ca…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@boris-petrov
Comment options

@dfreeman
Comment options

@boris-petrov
Comment options

@chriskrycho
Comment options

@dfreeman
Comment options

Answer selected by chriskrycho
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #191 on July 19, 2021 18:00.