Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/docxml/src/util/components.ts>registerComponent

An experimental Deno tool to transform XML to DOCX with a little XPath- and component based configuration
Go to Latest
function registerComponent
import { registerComponent } from "https://deno.land/x/docxml@1.5.0/src/util/components.ts";

Register a component in such a way that it can be found by its name later.

This helps avoid circular dependencies in components that can be a descendant of themselves. For example, Table --> Row --> Cell --> Table

Parameters

Component: XmlComponentClassDefinition<XmlComponent<{ [key: string]: any; }, any>> | XmlComponentClassDefinition<XmlComponent<{ [key: string]: any; }, never>>