aeson-typescript icon indicating copy to clipboard operation
aeson-typescript copied to clipboard

Generate TypeScript definition files from your ADTs

Results 10 aeson-typescript issues
Sort by recently updated
recently updated
newest added

This PR checks the type name for illegal characters before generating code.

Suppose we have this: ```haskell data MyThing' a = MyThing a | Nope Int $(deriveToJSONAndTypeScript defaultOptions ''MyThing') ``` It'll generate code like this: ```typescript export type TMyThing' = IMyThing |...

This PR adds `omitFields` to `ExtraTypeScriptOptions`. The general ideas was taken from this similar library for generating mobile types from Haskell: https://github.com/MercuryTechnologies/moat The motivating example is better support for breaking...

Specifically: * `Data.Functor.Compose.Compose` * `Data.Functor.Const.Const` * `Data.Functor.Identity.Identity` * `Data.Functor.Product.Product` * `Data.List.NonEmpty.NonEmpty` * `Data.Word.Word` * `Data.Word.Word16` * `Data.Word.Word32` * `Data.Word.Word64` * `Numeric.Natural.Natural` I checked the encoding against Aeson's in ghci, not...

This code: https://github.com/codedownio/aeson-typescript/blob/16d6c2a40730fdc72784ca70391b68c5086d78a1/src/Data/Aeson/TypeScript/Instances.hs#L114-L116 seems to assume `aeson` generates maps for `Data.Map`. This does not appear to be the case. Since JavaScript maps must be keyed by strings, `aeson` instead generates...

Thanks for `aeson-typescript`, it's great! ## Example I've noticed that when using `Data.Map` as follows: ```haskell newtype Example = Example (Map String Int) $(deriveTypeScript defaultOptions ''Foo) result = tt @Example...

Fixes #44 by not splitting the interface name before applying the modification function

`interfaceNameModifier` is documented as "Function applied to generate interface names" and so I'd expect it to apply to the whole interface name, but the call to it for `TSInterfaceDeclaration` splits...

In cases where a sum type is transcribed as a series of interfaces and a union type: ``` export type U = A | B | C; export interface A...