Add some typspecs.

This commit is contained in:
Jessica Canady 2024-07-02 11:13:03 -04:00
parent 87502823c5
commit 9c2fc2d583
Signed by: phoenix
SSH key fingerprint: SHA256:aaLOzOrLi+0n4eDZNQKH97PehwRt6KSE5fYJc+ZRKCQ

View file

@ -9,6 +9,9 @@ defmodule JOL.Blog do
@posts Enum.sort_by(@posts, & &1.date, {:desc, Date}) @posts Enum.sort_by(@posts, & &1.date, {:desc, Date})
@tags @posts |> Enum.flat_map(& &1.tags) |> Enum.uniq() |> Enum.sort() @tags @posts |> Enum.flat_map(& &1.tags) |> Enum.uniq() |> Enum.sort()
@spec posts() :: []
def posts, do: @posts def posts, do: @posts
@spec unique_tag_list() :: []
def unique_tag_list, do: @tags def unique_tag_list, do: @tags
end end