-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
27 lines (25 loc) · 867 Bytes
/
types.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
const classNames: (...args: any) => string;
declare module 'https://unpkg.com/htm?module' {
export function bind(
createElement: (type: any, props?: any, ...children: any[]) => any
): (strings: TemplateStringsArray, ...values: any[]) => any;
}
declare module 'https://unpkg.com/preact@latest?module' {
function createElement(type: any, props?: any, ...children: any[]): any;
export const h: typeof createElement;
export function render(
element: any,
target: any,
callback?: () => void
): any;
}
declare module 'https://unpkg.com/preact@latest/hooks/dist/hooks.module.js?module' {
export function useState<T>(
initialState: T | (() => T)
): [T, (newState: T | ((oldState: T) => T)) => void];
export function useEffect(
effect: () => void | (() => void),
inputs?: any[]
): void;
export function useRef<T>(initialValue: T): { current: T };
}