What is TypeInfo?
TypeInfo is an auto-generated JavaScript module that contains structured type information for all documented API items in your project. It provides a convenient way to reference type structures in your documentation with full IDE autocomplete support. When you runmint-tsdocs generate, the tool creates TypeInfo.jsx and TypeInfo.d.ts files in your snippets directory. These files contain all the type information extracted from your TypeScript API in a format compatible with Mintlify’s <TypeTree> component.
Why Use TypeInfo?
1. IDE Autocomplete
With TypeInfo, you get full autocomplete when referencing types in your documentation:2. Single Source of Truth
Instead of manually maintaining type documentation, TypeInfo is automatically generated from your TypeScript source code. Your documentation stays in sync with your implementation.3. Nested Property Access
TypeInfo includes fully recursive type information, so you can access nested properties:How to Use TypeInfo
Basic Usage with TypeTree
The most common use case is passing TypeInfo directly to the<TypeTree> component:
- Property names
- Type information
- Descriptions from TSDoc comments
- Required/optional indicators
- Default values
- Deprecated warnings
Accessing Individual Properties
You can also extract specific properties for custom documentation:Available Type Information
Each type in TypeInfo includes:The property or type name
The TypeScript type (e.g., “string”, “boolean”, “object”)
Description extracted from TSDoc comments
Whether the property is required (not optional)
Whether the property is marked as deprecated
The default value from
@defaultValue TSDoc tagNested properties for object types (fully recursive)
Exploring Available Types
To see what types are available in your TypeInfo:-
Open the generated file: Check
docs/snippets/tsdocs/TypeInfo.jsxto browse all available types -
Use IDE autocomplete: Start typing
TypeInfo.in your MDX file and your IDE will show all available packages -
Check the structure: TypeInfo is organized as:
Where
PackageNameis your package name in PascalCase (e.g., “mint-tsdocs” becomes “MintTsdocs”)
Import Path Considerations
If you encounter import errors, try both:Example: Complete Documentation Page
Here’s a complete example showing TypeInfo in action:Relationship to Link Validation
TypeInfo is part of a family of auto-generated files that make mint-tsdocs documentation more reliable:- TypeInfo (this page) - Provides structured type information for documenting types
- ValidRefs - Contains all valid API reference IDs for link validation
- ValidPages - Contains all valid documentation page paths
mint-tsdocs generate and work together to provide type safety and validation throughout your documentation. Learn more in the Link Validation documentation.
Best Practices
-
Always regenerate after API changes: Run
mint-tsdocs generatewhenever your TypeScript API changes to keep TypeInfo in sync - Use descriptive TSDoc comments: Since TypeInfo extracts descriptions from TSDoc, write comprehensive comments in your source code
- Leverage autocomplete: Take advantage of IDE autocomplete by importing TypeInfo at the top of your MDX files
-
Check for nested properties: Use the
propertiesarray to access and document nested object structures -
Add to .gitignore: Consider adding
docs/snippets/tsdocs/to your.gitignoreif you regenerate docs in CI/CD

