Skip to content

Commit a7f38f0

Browse files
authored
🤖 Merge PR DefinitelyTyped#72857 [mjml-core] Fix registerComponent function typing by @Freezystem
1 parent 971d81f commit a7f38f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎types/mjml-core/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const components: { [componentName: string]: Component | undefined };
157157
/**
158158
* Registers a component for use in mjml
159159
*/
160-
export function registerComponent(ComponentClass: typeof Component): void;
160+
export function registerComponent(ComponentClass: typeof Component, options?: { registerDependencies?: boolean }): void;
161161

162162
export abstract class BodyComponent extends Component {
163163
constructor(initialData: unknown);

‎types/mjml-core/mjml-core-tests.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class MjBreakpoint extends HeadComponent {
3939
}
4040

4141
registerComponent(MjBreakpoint);
42-
registerComponent(NewBodyComponent);
42+
registerComponent(NewBodyComponent, { registerDependencies: true });
4343

4444
const skeleton: MJMLJsonObject = {
4545
tagName: "mjml",

0 commit comments

Comments
 (0)