defmodule TypeiTest do | |
use ExUnit.Case | |
doctest Typei | |
# declare type that is made up of other types | |
@type payment :: %Payment{ # Payment is a ...? Record?? Struct??) | |
invalid_at :: DateTime.t, # DateTime specifically tied to ... ? Module?? | |
admin_removed_at :: DateTime.t, | |
removed_at :: DateTime.t, | |
ready_at :: DateTime.t, | |
payout_at :: DateTime.t, | |
created_at :: DateTime.t, | |
id :: number # float or int (vague) | |
} | |
test "the truth" do | |
payment = %Payment{} # need to make empty by using ... ? %Payment{}?? | |
payment.last_event = "ready" | |
assert payment.last_event = "ready" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
What is the correct syntax for declaring a type?