We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@spice type tOp = { label: option<string>, value?: int, } let sample2 = Js.Dict.empty() sample2->Js.Dict.set("label", Js.Json.string("sample")) let sampleJson2 = sample2->Js.Json.object_ let sampleRecord2: Records.tOp = { label: Some("sample"), } let encoded = sampleRecord2->Records.tOp_encode t->testEqual(`encode omit optional field`, encoded, sampleJson2) // ok let decoded = sampleJson2->Records.tOp_decode t->testEqual(`decode omit optional field`, decoded, Ok(sampleRecord2)) // { TAG: 'Ok', _0: { label: 'sample', value: undefined } } { TAG: 'Ok', _0: { label: 'sample' } }
The text was updated successfully, but these errors were encountered:
rescript-lang/rescript#6485
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: