getsurance/elm-street/2.0.0

ElmStreet.AutocompletePrediction

Type aliases for Google Autocomplete api

Type aliases

{ description : String
, id : String
, matcheSubstrings : List PredictionSubstring
, placeId : String
, reference : String
, structuredFormatting : StructuredFormatting
, terms : List PredictionTerm
, types : List String
}

Type alias for objects of type AutcompletePrediction

{ mainText : String
, mainTextPredictionSubstrings : List PredictionSubstring
, secondaryText : String
}

Type alias for objects of type StructuredFormatting

type alias PredictionTerm =
{ offset : Int
, value : String
}

Type alias for objects of type PredictionPredictionTerm

type alias PredictionSubstring =
{ length : Int
, offset : Int
}

Type alias for objects of type PredictionSubstring

Decoding

decoder : Decoder AutocompletePrediction
decodeList : Decoder (List AutocompletePrediction)

Decoder for list of AutcompletePrediction