forked from Download/preact-helmet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
45 lines (38 loc) · 1.03 KB
/
index.d.ts
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
33
34
35
36
37
38
39
40
41
42
43
44
45
/// <reference types="preact" />
import preact from 'preact';
declare class PreactHelmet extends preact.Component<
PreactHelmet.HelmetProps,
any
> {
render(...args: any[]): JSX.Element | null;
}
declare namespace PreactHelmet {
function peek(): PreactHelmet.HelmetData;
function rewind(): PreactHelmet.HelmetData;
interface HelmetProps {
base?: any;
defaultTitle?: string;
htmlAttributes?: any;
link?: Array<any>;
meta?: Array<any>;
script?: Array<any>;
style?: Array<any>;
title?: string;
titleTemplate?: string;
onChangeClientState?: (newState: any) => void;
}
interface HelmetData {
base: HelmetDatum;
htmlAttributes: HelmetDatum;
link: HelmetDatum;
meta: HelmetDatum;
script: HelmetDatum;
style: HelmetDatum;
title: HelmetDatum;
}
interface HelmetDatum {
toString(): string;
toComponent(): preact.Component<any, any>;
}
}
export default PreactHelmet;