@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
23 lines • 1 kB
text/typescript
import type { EnhancedTypesMeta } from "../abstractCreateTypes/typesToJsx.mjs";
export type TypesTableProps<T extends {}> = T & {
/**
* The main type for this export (component, hook, or function).
* Undefined when rendering only additional types (e.g., AdditionalTypes component).
*/
type: EnhancedTypesMeta | undefined;
/**
* Additional types related to this export.
* Includes both namespaced types (like .Props, .State) and global non-namespaced types.
*/
additionalTypes: EnhancedTypesMeta[];
multiple?: boolean;
};
/**
* Hook for accessing types props in TypesTable components.
*
* When rendered inside a `TypesDataProvider`, automatically registers
* the main type and additional types into the context so they can be
* looked up by name via `useType(name)`, and registers their properties
* so they can be looked up via `useTypeProp(typeName, propName)`.
*/
export declare function useTypes<T extends {}>(contentProps: TypesTableProps<T>): TypesTableProps<T>;