Skip to content

Commit 80f4d26

Browse files
committed
docs(tre): enhanced documentation
1 parent ec4a53c commit 80f4d26

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

packages/transient-render-engine/src/model/HTMLElementModel.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,27 +163,22 @@ export default class HTMLElementModel<
163163
}
164164

165165
/**
166-
* Create an {@link HTMLElementModel} from a custom description.
166+
* Create an {@link HTMLElementModel} from a custom template.
167167
*
168-
* @param customElementModel - The custom model declaration.
168+
* @param template - The custom template.
169169
*/
170170
static fromCustomModel<
171171
CustomTags extends string,
172172
ContentModel extends HTMLContentModel
173-
>(
174-
customElementModel: CustomElementModel<
175-
Exclude<CustomTags, TagName>,
176-
ContentModel
177-
>
178-
) {
173+
>(template: CustomElementModel<CustomTags, ContentModel>) {
179174
const {
180175
contentModel,
181176
tagName,
182177
isOpaque = false,
183178
isVoid = false,
184179
...optionalFields
185-
} = customElementModel;
186-
return new HTMLElementModel<Exclude<CustomTags, TagName>, ContentModel>({
180+
} = template;
181+
return new HTMLElementModel<CustomTags, ContentModel>({
187182
tagName,
188183
contentModel,
189184
isOpaque,

0 commit comments

Comments
 (0)