Poulet42/Add Component To Template Registry

/icons/calendar.svg

Last update

Jan 9, 2025

Example

This codemod adds a glint registry declaration in component files if it's not present already.

Before

export default class MyComponent extends Component {
...
}

After

export default class MyComponent extends Component {
...
}
declare module '@glint/environment-ember-loose/registry' {
export default interface Registry {
'Path::To::MyComponent': typeof MyComponent;
}
}

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now