Skip to content

unpexpected : due to type definition in TS #211

@deepakaggarwal7

Description

@deepakaggarwal7

TS file method with datatype in function doesn't work.

myFunction inside somefile.ts, which is rewired
Doesn't work

function myFunction(a: number, b: number) {
  return a + b;
}

Error thrown: SyntaxError: Unexpected token ':'

Works

function myFunction(a, b) {
  return a + b;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions