From 04d5212106827326da3ff0da2b2b608d17cee2ff Mon Sep 17 00:00:00 2001 From: Zach Daniel Date: Fri, 18 Oct 2024 15:21:18 -0400 Subject: [PATCH] fix: typespec for `find_all/3` (#165) --- lib/sourceror/zipper.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sourceror/zipper.ex b/lib/sourceror/zipper.ex index 9c5a8fa..9905dc8 100644 --- a/lib/sourceror/zipper.ex +++ b/lib/sourceror/zipper.ex @@ -733,7 +733,7 @@ defmodule Sourceror.Zipper do The optional second parameters specifies the `direction`, defaults to `:next`. """ - @spec find_all(t, direction :: :prev | :next, predicate :: (tree -> any)) :: t | [] + @spec find_all(t, direction :: :prev | :next, predicate :: (tree -> any)) :: [t] def find_all(%Z{} = zipper, direction \\ :next, predicate) when direction in [:next, :prev] and is_function(predicate, 1) do do_find_all(zipper, move(direction), predicate, [])