Improve some type annotations that are getting referenced incorrectly without the help of Elm.withType (see https://github.com/mdgriffith/elm-codegen/issues/48).

This commit is contained in:
Dillon Kearns 2022-09-13 08:42:12 -07:00
parent ef9b664cb3
commit 90ae03c271

View File

@ -225,6 +225,7 @@ file templates =
) )
) )
) )
|> Elm.withType (Elm.Annotation.named [ "Path" ] "Path")
) )
) )
|> expose |> expose
@ -235,6 +236,13 @@ file templates =
(\route -> (\route ->
Gen.Server.Response.call_.temporaryRedirect Gen.Server.Response.call_.temporaryRedirect
(toString.call route) (toString.call route)
|> Elm.withType
(Elm.Annotation.namedWith [ "Server", "Response" ]
"Response"
[ Elm.Annotation.var "data"
, Elm.Annotation.var "error"
]
)
) )
) )
|> expose |> expose