stil4m / elm-syntax / Elm.Syntax.TypeAlias

This syntax represents type aliases. For example:

{-| This is a person
-}
type alias Person =
    { name : String
    , age : Int
    }

Types


type alias TypeAlias =
{ documentation : Maybe (Elm.Syntax.Node.Node Elm.Syntax.Documentation.Documentation)
, name : Elm.Syntax.Node.Node String
, generics : List (Elm.Syntax.Node.Node String)
, typeAnnotation : Elm.Syntax.Node.Node Elm.Syntax.TypeAnnotation.TypeAnnotation 
}

Type alias that defines the syntax for a type alias. A bit meta, but you get the idea. All information that you can define in a type alias is embedded.

Serialization

encode : TypeAlias -> Json.Encode.Value

Encode a TypeAlias syntax element to JSON.

decoder : Json.Decode.Decoder TypeAlias

JSON decoder for a Declaration syntax element.