Intelligent TypeScript type discovery and application for VS Code
IntelliType is a VS Code extension that helps TypeScript developers discover and apply existing types to untyped objects in their codebase. It automatically analyzes object shapes and suggests compatible interfaces, reducing code duplication and improving type consistency.
- Automatically detects untyped objects in TypeScript files
- Analyzes object shapes and property structures
- Shows subtle diagnostic indicators for objects that could benefit from typing
- Hover over untyped objects to see a list of compatible types
- See a compatibility score for each suggested type
- Click a suggested type directly in the hover panel to apply it
- Automatic import statements are added when a type is applied
- Works with your existing TypeScript (
.tsand.tsx) configuration - Non-intrusive UI that follows VS Code conventions
- Configurable diagnostic levels
- Open VS Code
- Go to the Extensions view (
Ctrl+Shift+X) - Search for
IntelliType - Click Install on the "IntelliType" extension by raz-labs
Alternatively, open the command palette (Ctrl+P) and enter:
ext install raz-labs.intellitype
- Open any TypeScript or TSX file in your project.
- IntelliType will automatically analyze untyped object literals.
- Look for a wavy blue underline beneath the names of untyped variables.
- Hover over an underlined variable to see a popup with compatible type suggestions.
- In the hover panel, click on the name of the type you want to apply.
- The type will be applied to your variable, and an import statement will be added if necessary.
// Before IntelliType
const user = {
id: 1,
name: "John Doe",
email: "john@example.com"
};
// After using IntelliType (one click!)
const user: User = {
id: 1,
name: "John Doe",
email: "john@example.com"
};IntelliType can be configured through VS Code settings:
{
// Enable/disable the extension
"intellitype.enabled": true,
// Show diagnostic squiggly lines
"intellitype.showDiagnostics": true,
// Minimum compatibility score (0-1)
"intellitype.minimumCompatibilityScore": 0.7,
// Maximum number of type suggestions
"intellitype.maxSuggestions": 5,
// Include types from node_modules
"intellitype.includeNodeModules": false
}- VS Code 1.74.0 or higher
- TypeScript 4.0 or higher
- A TypeScript project with a
tsconfig.jsonfile
- Type matching is currently limited to exact property matches
- Generic types are not fully supported in the MVP
- Initial release
- Basic object shape analysis
- Diagnostic indicators for untyped objects
- Hover provider with property information
- Simple type matching and application
This project is open source and contributions are welcome! If you have a feature request, bug report, or want to contribute to the code, please check out the GitHub repository.
Please feel free to open an issue or submit a pull request.
This extension is licensed under the MIT License.
Enjoy coding with IntelliType! 🚀