The seat count runs but fails the type check

Code can print the right number while TypeScript reports an error.

your task

Fix the calculation in seatsLeft. Keep both parameter types. The type check and all three existing outputs must pass.

Run the starter. All three seat counts are correct, but TypeScript reports the subtraction in seats.ts. The caller gets the number of taken seats as text from the page.

Starter code
or press Ctrl EnterNot run yet

type check

Not run yetseats.ts

Expected result: no type errors.

cases

Not run yet3 of 12 seats taken

Expected output

19
See the input and the code for this case
console.log(seatsLeft(12, "3"));
Not run yet10 of 12 seats taken

Expected output

12
See the input and the code for this case
console.log(seatsLeft(12, "10"));
Not run yetEvery seat taken

Expected output

10
See the input and the code for this case
console.log(seatsLeft(8, "8"));