Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/docxml/src/utilities/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@2.1.0/src/utilities/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: ComponentDefinition<Component<{ [key: string]: any; }, any>> | ComponentDefinition<Component<{ [key: string]: any; }, never>>