From 05a79c2dbd236500d73423cd9cfe39b1096c8663 Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Tue, 3 Nov 2020 13:58:41 -0500 Subject: [PATCH] chore: add built_in? ash type helper --- lib/ash/type/type.ex | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ash/type/type.ex b/lib/ash/type/type.ex index 4845a682..69a8768f 100644 --- a/lib/ash/type/type.ex +++ b/lib/ash/type/type.ex @@ -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: