@lwc/engine-server
Version:
Renders LWC components in a server environment.
17 lines • 777 B
TypeScript
import type { LightningElement } from '@lwc/engine-core';
/**
* Renders a string representation of a serialized component tree.
* @param tagName The name of the tag to render.
* @param Ctor The LWC constructor to render with.
* @returns A string representation of the serialized component tree.
* @throws Throws when called with invalid parameters.
* @example
* import { renderComponent } from '@lwc/engine-server';
* import LightningHello from 'lightning/hello';
* const componentProps = {};
* const serialized = renderComponent('lightning-hello', LightningHello, componentProps);
*/
export declare function renderComponent(tagName: string, Ctor: typeof LightningElement, props?: {
[name: string]: any;
}): string;
//# sourceMappingURL=render-component.d.ts.map