check_method_calls
Validates JavaScript/TypeScript code for correct method and property usage on web components, catching hallucinated API calls, typos, and improper usage.
Instructions
Validates JavaScript/TypeScript code for correct method and property usage on web components — catches hallucinated API calls (methods that do not exist), properties called as methods (e.g. dialog.open() when open is a boolean), methods assigned as properties (e.g. dialog.show = true), and typos with suggestions. Run this on any JS code that interacts with web component APIs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| libraryId | No | Optional library ID to target a specific loaded library instead of the default. | |
| codeText | Yes | The JavaScript/TypeScript code to validate for method/property usage. | |
| tagName | Yes | The custom element tag name to validate against (e.g. "sl-dialog"). |