Skip to content

Commit

Permalink
add a possible promise string as the return value
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Feb 8, 2024
1 parent 5fbe601 commit 9756cc8
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { VNode } from 'preact';

export default function renderToString<P = {}>(vnode: VNode<P>, context?: any): string;
export default function renderToString<P = {}>(
vnode: VNode<P>,
context?: any
): string | Promise<string>;

export function render<P = {}>(vnode: VNode<P>, context?: any): string;
export function renderToString<P = {}>(vnode: VNode<P>, context?: any): string;
export function renderToStaticMarkup<P = {}>(vnode: VNode<P>, context?: any): string;
export function render<P = {}>(
vnode: VNode<P>,
context?: any
): string | Promise<string>;
export function renderToString<P = {}>(
vnode: VNode<P>,
context?: any
): string | Promise<string>;
export function renderToStaticMarkup<P = {}>(
vnode: VNode<P>,
context?: any
): string | Promise<string>;

0 comments on commit 9756cc8

Please sign in to comment.