ts-to-io icon indicating copy to clipboard operation
ts-to-io copied to clipboard

Fails on optional properties

Open mkatrenik opened this issue 5 years ago • 2 comments

It erros on optional properties

interface Foo {
  prop?: number
}

// Error: Failed to generate a codec

mkatrenik avatar Dec 07 '19 17:12 mkatrenik

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.

jsphweid avatar Jan 02 '20 16:01 jsphweid

We can close this

ahrjarrett avatar Aug 01 '20 16:08 ahrjarrett