Parameter 'a' implicitly has an 'any' type when attempting to run the first exercise
kqvanity opened this issue · 1 comments
kqvanity commented
when i try to run the first exercise, I get the following error messages
Running tests...
RUN v0.21.1 /home/elementary/Downloads/beginners-typescript-tutorial
✓ src/01-number.problem.ts (1)
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 14:16:57
Duration 1.30s (setup 62ms, collect 27ms, tests 5ms)
Checking types...
src/01-number.problem.ts:3:31 - error TS7006: Parameter 'a' implicitly has an 'any' type.
3 export const addTwoNumbers = (a, b) => {
~
src/01-number.problem.ts:3:34 - error TS7006: Parameter 'b' implicitly has an 'any' type.
3 export const addTwoNumbers = (a, b) => {
~
Found 2 errors in the same file, starting at: src/01-number.problem.ts:3
I've tried settings tsconfig.json
's noImplicityAny' and
strict` options to 'false' as advisable on the internet, but the error still persists. Any help?
mattpocock commented
The point of the exercise is to try and fix this error. When you fix the TS errors, the exercise will be marked as complete and you can continue to the next one!