Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybes in Interfaces should be optional #29

Open
notquiteamonad opened this issue Mar 15, 2021 · 0 comments
Open

Maybes in Interfaces should be optional #29

notquiteamonad opened this issue Mar 15, 2021 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@notquiteamonad
Copy link
Owner

Currently, given an elm record type:

type alias User =
  { uid: String
  , email: Maybe String
  }

the resultant DTS will be

export interface User {
  uid: string;
  email: string | void | null;
}

This doesn't actually allow the parameters to be omitted, as the void was intended to do. Instead, the following DTS should be generated:

export interface User {
  uid: string;
  email?: string | null;
}
@notquiteamonad notquiteamonad added bug Something isn't working good first issue Good for newcomers labels Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant