forked from preactjs/preact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
internal.d.ts
48 lines (39 loc) · 1.25 KB
/
internal.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
46
47
48
import {
Component as PreactComponent,
VNode as PreactVNode,
FunctionComponent as PreactFunctionComponent,
PreactElement
} from '../../src/internal';
import { SuspenseProps } from './suspense';
export { ComponentChildren } from '../..';
export { PreactElement };
export interface Component<P = {}, S = {}> extends PreactComponent<P, S> {
isReactComponent?: object;
isPureReactComponent?: true;
_patchedLifecycles?: true;
// Suspense internal properties
_childDidSuspend?(error: Promise<void>, suspendingVNode: VNode): void;
_suspended: (vnode: VNode) => (unsuspend: () => void) => void;
_onResolve?(): void;
// Portal internal properties
_temp: any;
_container: PreactElement;
}
export interface FunctionComponent<P = {}> extends PreactFunctionComponent<P> {
shouldComponentUpdate?(nextProps: Readonly<P>): boolean;
_forwarded?: boolean;
_patchedLifecycles?: true;
}
export interface VNode<T = any> extends PreactVNode<T> {
$$typeof?: symbol | string;
preactCompatNormalized?: boolean;
}
export interface SuspenseState {
_suspended?: null | VNode<any>;
}
export interface SuspenseComponent
extends PreactComponent<SuspenseProps, SuspenseState> {
_pendingSuspensionCount: number;
_suspenders: Component[];
_detachOnNextRender: null | VNode<any>;
}