@fluentui/react-northstar
Version:
A themable React component library.
109 lines (108 loc) • 3.44 kB
TypeScript
import * as React from 'react';
declare type ReactEventResponder<E, C> = {
$$typeof: Symbol | number;
displayName: string;
targetEventTypes: null | string[];
rootEventTypes: null | string[];
getInitialState: null | ((props: Object) => Object);
onEvent: null | ((event: E, context: C, props: Object, state: Object) => void);
onRootEvent: null | ((event: E, context: C, props: Object, state: Object) => void);
onMount: null | ((context: C, props: Object, state: Object) => void);
onUnmount: null | ((context: C, props: Object, state: Object) => void);
};
declare type ReactEventResponderInstance<E, C> = {
fiber: Object;
props: Object;
responder: ReactEventResponder<E, C>;
rootEventTypes: null | Set<string>;
state: Object;
};
export declare type HookType = 'useState' | 'useReducer' | 'useContext' | 'useRef' | 'useEffect' | 'useLayoutEffect' | 'useCallback' | 'useMemo' | 'useImperativeHandle' | 'useDebugValue' | 'useResponder';
declare type ReactProviderType<T> = {
$$typeof: Symbol | number;
_context: ReactContext<T>;
};
declare type ReactContext<T> = {
$$typeof: Symbol | number;
Consumer: ReactContext<T>;
Provider: ReactProviderType<T>;
_calculateChangedBits: ((a: T, b: T) => number) | null;
_currentValue: T;
_currentValue2: T;
_threadCount: number;
_currentRenderer?: Object | null;
_currentRenderer2?: Object | null;
};
declare type ContextDependency<T> = {
context: ReactContext<T>;
observedBits: number;
next: ContextDependency<any> | null;
};
declare enum WorkTag {
FunctionComponent = 0,
ClassComponent = 1,
IndeterminateComponent = 2,
HostRoot = 3,
HostPortal = 4,
HostComponent = 5,
HostText = 6,
Fragment = 7,
Mode = 8,
ContextConsumer = 9,
ContextProvider = 10,
ForwardRef = 11,
Profiler = 12,
SuspenseComponent = 13,
MemoComponent = 14,
SimpleMemoComponent = 15,
LazyComponent = 16,
IncompleteClassComponent = 17,
DehydratedFragment = 18,
SuspenseListComponent = 19,
FundamentalComponent = 20,
ScopeComponent = 21
}
declare type Source = {
fileName: string;
lineNumber: number;
};
declare type ExpirationTime = number;
declare type Dependencies = {
expirationTime: ExpirationTime;
firstContext: ContextDependency<any> | null;
responders: Map<ReactEventResponder<any, any>, ReactEventResponderInstance<any, any>> | null;
};
export declare type Fiber = {
tag: WorkTag;
key: null | string;
elementType: any;
type: any;
stateNode: any;
return: Fiber | null;
child: Fiber | null;
sibling: Fiber | null;
index: number;
ref: React.Ref<any>;
pendingProps: any;
memoizedProps: any;
memoizedState: any;
dependencies: Dependencies | null;
nextEffect: Fiber | null;
firstEffect: Fiber | null;
lastEffect: Fiber | null;
expirationTime: ExpirationTime;
childExpirationTime: ExpirationTime;
alternate: Fiber | null;
actualDuration?: number;
actualStartTime?: number;
selfBaseDuration?: number;
treeBaseDuration?: number;
_debugID?: number;
_debugSource?: Source | null;
_debugOwner?: Fiber | null;
_debugIsCurrentlyTiming?: boolean;
_debugNeedsRemount?: boolean;
_debugHookTypes?: HookType[] | null;
};
export declare function getReactFiberFromNode(elm: Node | undefined): Fiber | null;
export {};