Skip to content

Parameter 'a' implicitly has an 'any' type when attempting to run the first exercise #36

Closed
@kqvanity

Description

@kqvanity

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions