Skip to content

Function Parameter Types #108

@anthonyjoeseph

Description

@anthonyjoeseph

This doesn't work:

function addThree(num: number): number {
  return num + 3;
}

/*
main.ts:1:21: error: ',' expected
main.ts:1:29: error: Missing an opening brace - '{
main.ts:1:30: error: Declaration or statement expected
*/

This does work:

function addThree(num): number {
  return num + 3;
}

Although the output seems to be looking for a parameter type:

int16_t addThree(/* Cannot determine variable type from source null*/ num) {
{ ...

P.S. This project is so exciting! I was thrilled when I came across it - great work!

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