mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 12:52:27 +03:00
Handle optional splat.
This commit is contained in:
parent
2115b9be9d
commit
261cd64ed5
@ -186,7 +186,12 @@ endingToVariantName ending =
|
||||
)
|
||||
|
||||
OptionalSplat ->
|
||||
( "SPLAT__", Just ( "splat", Elm.Annotation.string ) )
|
||||
( "SPLAT__"
|
||||
, Just
|
||||
( "splat"
|
||||
, Elm.Annotation.list Elm.Annotation.string
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
{-| -}
|
||||
|
@ -107,6 +107,18 @@ suite =
|
||||
]
|
||||
]
|
||||
)
|
||||
, test "optional splat" <|
|
||||
\() ->
|
||||
[ "SPLAT__" ]
|
||||
|> expectRouteDefinition
|
||||
(Elm.variantWith "SPLAT__"
|
||||
[ Elm.Annotation.record
|
||||
[ ( "splat"
|
||||
, Elm.Annotation.list Elm.Annotation.string
|
||||
)
|
||||
]
|
||||
]
|
||||
)
|
||||
]
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user