Poulet42/Add Boilerplate Signature Glimmer

1.0.1Last update Jan 28, 2025
by@poulet42

Example

This codemod adds an empty component TS signature to glimmer components

Before

export default class MyButtonComponent extends Component {
...
}

After

interface MyButtonSignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class MyButtonComponent extends Component<MyButtonSignature> {
...
}

Build custom codemods

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

background illustrationGet Started Now