chore: add built_in? ash type helper

This commit is contained in:
Zach Daniel 2020-11-03 13:58:41 -05:00
parent bd190f91f2
commit 05a79c2dbd
No known key found for this signature in database
GPG key ID: C377365383138D4B

View file

@ -27,6 +27,11 @@ defmodule Ash.Type do
utc_datetime: Ash.Type.UtcDatetime
]
@builtin_types Keyword.values(@short_names)
def builtin?(type) when type in @builtin_types, do: true
def builtin?(_), do: false
@doc_list_constraints Keyword.put(@list_constraints, :items,
type: :any,
doc: