Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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"

This comment has been minimized.

Copy link
Owner Author

@robotarmy robotarmy commented Nov 29, 2016

What is the correct syntax for declaring a type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment