bitloops-language icon indicating copy to clipboard operation
bitloops-language copied to clipboard

Optional fields are not supported

Open ellik95 opened this issue 2 years ago • 0 comments

Describe the bug It seems that optional fields are not supported. In the target output the getters generators return the type of the field, but they need to return ${type} | undefined.

To Reproduce Steps to reproduce the behavior:

Props ProjectProps {
  optional string name;
}

Expected behavior The typescript output must be like below:

get name(): string | undefined {
    return this.props.name;
  }

Additional context Check if there is other problem with optional and that everything works well.

ellik95 avatar Jan 18 '23 13:01 ellik95