validate_cs_script
Type-check cs_script code with the TypeScript compiler against Valve’s point_script.d.ts to catch unknown APIs and type-narrowing issues before shipping.
Instructions
Type-check a cs_script with the TypeScript compiler against this build's Valve point_script.d.ts.
Errors with category unknown_api mean the method/property does not exist — fix before shipping.
needs_type_narrowing gives the subclass to cast to. ALWAYS run this before handing a script to the user.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | JavaScript source to check | |
| game | No | Game id: one of cs2, deadlock | cs2 |
| path | No | Path of the .js file inside the addon | |
| addon | No | Or: addon whose file to check |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when there are no errors (warnings/info allowed) | |
| errors | Yes | ||
| checker | Yes | ||
| warnings | Yes | ||
| diagnostics | Yes | ||
| instance_methods_used | No |