Conversation
|
WalkthroughThis pull request enhances RegExp type inference in Biome's JavaScript type system. Changes include reworking literal value formatting to include explicit type prefixes (e.g., "string:", "number:"), adding three new RegExp-related type IDs to the global type registry, extending the global resolver with RegExp class and method definitions, introducing a helper method to detect RegExp type references, and adding a corresponding test for regex literal type inference. Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (30)
📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-08-20T16:24:59.781ZApplied to files:
📚 Learning: 2025-09-09T18:10:05.095ZApplied to files:
🧬 Code graph analysis (3)crates/biome_js_type_info/src/format_type_info.rs (3)
crates/biome_js_type_info/tests/local_inference.rs (2)
crates/biome_js_type_info/src/globals.rs (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
🔇 Additional comments (7)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
Correct :) |
CodSpeed Performance ReportMerging #8166 will not alter performanceComparing Summary
Footnotes
|
Summary
Introduces global type definitions for the regex type.
This is a stepping stone towards resolving #8034.
Note that the regex types don't carry flags yet, which I think still needs to be done to resolve the issue.
Please be aware there are two regex types in our type inference engine: there are instances of the
RegExpclass (created when usingnew RegExp()), but there are also regex literals (/ab+c/).Test Plan
Test added. Snapshots updated.
Docs
N/A