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

Fails on optional properties #7

Open
mkatrenik opened this issue Dec 7, 2019 · 2 comments
Open

Fails on optional properties #7

mkatrenik opened this issue Dec 7, 2019 · 2 comments

Comments

@mkatrenik
Copy link

It erros on optional properties

interface Foo {
  prop?: number
}

// Error: Failed to generate a codec

@jsphweid
Copy link

jsphweid commented Jan 2, 2020

I made a PR that fixes this (#10 ). Basically, prop?: number is seen as a union of number and undefined, but undefined (type flag 32768) wasn't recognized by this lib.

@ahrjarrett
Copy link

We can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants