From d0b6988a1a49ae0966e887e892508f2afc12bc6a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 29 Oct 2021 11:15:12 +0300 Subject: Initial commit --- src/Types.elm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/Types.elm (limited to 'src/Types.elm') diff --git a/src/Types.elm b/src/Types.elm new file mode 100644 index 0000000..de1cccf --- /dev/null +++ b/src/Types.elm @@ -0,0 +1,31 @@ +module Types exposing (..) + + +type alias Model = + { posts : List Post + , displayError : DisplayableError + } + + +type Msg + = NoOp + | FetchPostsSuccess (List Post) + | FetchPostsFailure DisplayableError + + +type DisplayableError + = Error String + | NoError + + +type alias Author = + { id : String + , name : String + } + + +type alias Post = + { id : String + , content : String + , author : Author + } -- cgit v1.3