{"enrichment":{"faq":[{"a":"Biome's type-inference skill teaches you to build lint rules that leverage the type inference engine. Start by understanding the three-phase resolution process: local inference (within a file), module-level resolution (across a module), and cross-module full inference. Use TypeResolver to access resolved types, and apply the TypeReference pattern to avoid stale data in IDE environments. This approach lets you write rules that understand type relationships and catch type-related issues.","q":"How do I implement type-aware lint rules using Biome's type inference?"},{"a":"Biome's module graph architecture organizes type information across files without cloning data. The key constraint is that the module graph prevents unnecessary data duplication, which keeps the IDE responsive. The architecture uses TypeData enum variants to represent different type states and ResolvedTypeId structures to track resolved types. Understanding these constraints helps you work within the system's design when implementing cross-file lint rules or resolving types across module boundaries.","q":"What is the biome module graph architecture and its constraints?"},{"a":"The type-inference skill covers TypeResolver as the core trait for resolving types across modules. TypeResolver handles the three resolution phases and returns ResolvedTypeId structures that point to resolved types. When working with TypeResolver, you access types without cloning them, respecting the module graph's no-cloning constraint. This is essential for implementing lint rules that need to understand types defined in other files or modules.","q":"How do I resolve types across module boundaries with TypeResolver?"},{"a":"Type-inference includes guidance on working with CSS and HTML class tracking within the module graph. This feature allows lint rules to understand class relationships across files, enabling cross-file analysis. The module graph's architecture supports tracking class references and their type information, which is useful for rules that validate styling consistency or detect unused classes.","q":"What does type-inference cover for CSS and HTML class tracking?"},{"a":"Type-inference provides techniques for debugging the type flattening process and inference engine when building new features. Understanding how TypeData enum variants flow through the three resolution phases helps you trace where inference might fail. The skill covers how Biome's Salsa-based caching system supports type inference, allowing you to identify performance bottlenecks and correctness issues in your type-aware implementations.","q":"How do I debug type inference and flattening for new Biome features?"},{"a":"The TypeReference pattern is central to type-inference and prevents stale type data in IDE environments. Instead of storing direct type references that can become outdated, TypeReference uses indirection to always point to current type information. This design keeps the IDE responsive and accurate, especially when files change. Understanding this pattern is crucial for implementing reliable type-aware lint rules that work correctly across IDE sessions.","q":"What is the TypeReference pattern and why does it matter in Biome?"}],"shadow_tags":["type-system-design","module-graph-architecture","lint-rule-implementation","cross-module-resolution","ide-performance-optimization","type-reference-patterns","css-html-tracking","salsa-caching-strategy"],"summary_rewrite":"This skill teaches you how to work with Biome's type inference engine and module graph architecture for building type-aware lint rules. It covers the three-phase type resolution process\u2014local inference, module-level resolution, and cross-module full inference\u2014plus the TypeReference pattern that prevents stale data in an IDE environment. Use it when implementing new type-aware rules, understanding type resolution, or working on type inference features."},"files":[{"bytes":13634,"path":".claude/skills/type-inference/SKILL.md","sha256":"cd9244f51d8fb7a0034bb236358848a8834549334534ab3842f151f17d946dce","url":"https://skillfed.io/files/biomejs/biome/type-inference/db55f85e/SKILL.md"}],"id":"biomejs/biome/type-inference","links":{"html":"https://skillfed.io/biomejs/biome/type-inference","md":"https://skillfed.io/biomejs/biome/type-inference.md","repo":"https://github.com/biomejs/biome"},"meta":{"agents_supported":["claude-code"],"first_seen":"2026-07-28","forks":1157,"language":"Rust","last_updated":"2026-07-27","license":"Apache-2.0","name":"type-inference","publisher":"biomejs","stars":25418},"relations":{"similar":[{"id":"biomejs/biome/biome-developer"},{"id":"biomejs/biome/doc-comments"},{"id":"managedcode/dotnet-skills/biome"},{"id":"syncfusion/react-ui-components-skills/syncfusion-react-appbar"},{"id":"syncfusion/blazor-ui-components-skills/syncfusion-blazor-appbar"},{"id":"syncfusion/react-ui-components-skills/syncfusion-react-buttons"},{"id":"bkywksj/knowledge-base/rust-fundamentals"},{"id":"dchuk/claude-code-tauri-skills/tauri-app-resources"},{"id":"bobmatnyc/claude-mpm-skills/biome"},{"id":"tursodatabase/turso/storage-format"}]},"slug":{"owner":"biomejs","repo":"biome","skill":"type-inference"},"version":"db55f85e"}
