Professional Documents
Culture Documents
Types
Types
Types
/**
* WARNING:
* This file contains types that are conceptually related to React internals and
* DevTools backends, but can be passed to frontend via the bridge.
* Be mindful of backwards compatibility when making changes.
*/
type BundleType =
| 0 // PROD
| 1; // DEV
// TODO: If it's useful for the frontend to know which types of data an Element has
// (e.g. props, state, context, hooks) then we could add a bitmask field for this
// to keep the number of attributes small.
export type FiberData = {
key: string | null,
displayName: string | null,
type: ElementType,
};
// Does the current renderer support editable hooks and function props?
canEditHooks: boolean,
canEditFunctionProps: boolean,
// Inspectable properties.
context: Object | null,
hooks: Object | null,
props: Object | null,
state: Object | null,
key: number | string | null,
errors: Array<[string, number]>,
warnings: Array<[string, number]>,
// List of owners
owners: Array<SerializedElement> | null,
type: ElementType,
...
};
// Testing
dangerous_setTargetConsoleForTesting?: (fakeConsole: Object) => void,
...
};