All notable changes to
dillonkearns/elm-ts-json
elm package
will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Object keys are correctly quoted in cases where unquoted keys cause invalid syntax. See #12. Thank you @pabra for the fix!
TsJson.Decode.discriminatedUnion
helper makes it easier to do simple unions that use the discriminated union convention.TsJson.Decode.stringUnion
for simple enumeration-style string unions.- Added
stringLiteral
forCodec
andDecode
modules
- New Codec API
- Decoder and Encoder types point to new internal type to avoid future breaking changes. This won't actually break code, but Elm will mark it as a breaking change because the underlying type is different.
- Add
TsJson.Encodde.variantTagged
function. - Remove duplicate object properties when a decoder decodes a field multiple times. TypeScript was giving the
Duplicate identifier 'foo'.(2300)
error for this output. The toTypeScript function no longer will result in repeated properties.