mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
chore: add built_in? ash type helper
This commit is contained in:
parent
bd190f91f2
commit
05a79c2dbd
1 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue