-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.d.ts
More file actions
32 lines (32 loc) · 1.18 KB
/
index.d.ts
File metadata and controls
32 lines (32 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { FunctionComponent, ReactElement } from 'react';
import createRouter, { replace, push, back, forward, link, onChange, useRouter, routing } from './Router';
import Link from './Link';
import routes, { Routes, Location as RouteLocation, Params as RouteParams } from './routes';
import log from './logger';
import NoSSR from './NoSSR';
export default function app({ routes, ssr, hydrate, likeApp, }: {
routes: Routes;
ssr: (router: FunctionComponent<{}>) => {
jsx: ReactElement;
callback?: (html: string) => string;
};
hydrate: (router: FunctionComponent<{}>) => {
jsx: ReactElement;
id: string;
callback?: () => void;
};
likeApp?: boolean;
}): Promise<(location: string) => Promise<{
jsx: ReactElement<any, string | import("react").JSXElementConstructor<any>>;
callback: ((html: string) => string) | undefined;
notFound: boolean;
}>>;
declare const router: {
replace: typeof replace;
push: typeof push;
back: typeof back;
forward: typeof forward;
link: typeof link;
onChange: typeof onChange;
};
export { createRouter, router, useRouter, routes, routing, Link, NoSSR, log, RouteLocation, RouteParams, };