Type
What kind of value something is: a number, some text (called a string), true or false (a boolean), and so on. The type decides what an operation means, so + adds two numbers but glues two strings together.
Whatever arrives from a form or an API is often text, even when it looks like a number. In plain JavaScript that gives a wrong answer with no error. TypeScript, which is JavaScript with types written in, turns it into an error before the code runs, and an agent can read that error and fix it by itself.
Say it to your agent
“The price comes from a form, so it is a string. Convert it once, where it enters, using Number(). Reject NaN with a clear error, and type it as number everywhere after that. No any.”