Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gentle-eyes-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"preact-render-to-string": patch
---

fix: use cjs types instead of esm for jsx export to fix default export from esm
23 changes: 16 additions & 7 deletions jsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@ interface Options {
skipFalseAttributes?: boolean;
}

export default function renderToStringPretty(
declare function renderToStringPretty(
vnode: VNode,
context?: any,
options?: Options
): string;
export function render(vnode: VNode, context?: any, options?: Options): string;

export function shallowRender(
vnode: VNode,
context?: any,
options?: Options
): string;
declare namespace renderToStringPretty {
export function render(
vnode: VNode,
context?: any,
options?: Options
): string;

export function shallowRender(
vnode: VNode,
context?: any,
options?: Options
): string;
}

export = renderToStringPretty;
23 changes: 16 additions & 7 deletions src/jsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@ interface Options {
skipFalseAttributes?: boolean;
}

export default function renderToStringPretty(
declare function renderToStringPretty(
vnode: VNode,
context?: any,
options?: Options
): string;
export function render(vnode: VNode, context?: any, options?: Options): string;

export function shallowRender(
vnode: VNode,
context?: any,
options?: Options
): string;
declare namespace renderToStringPretty {
export function render(
vnode: VNode,
context?: any,
options?: Options
): string;

export function shallowRender(
vnode: VNode,
context?: any,
options?: Options
): string;
}

export = renderToStringPretty;