You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A super nitpicky and minor issue I am having that I hope can be addressed down the line in a future version (or hopefully this serves to be useful to someone else): I am doing a pass over my codebase using Dialyxir and I noticed that for this library many of the example usages of Contentful.Delivery.Entries involve a pattern of passing Entries through to functions:
Entries|>fetch_all
However, when I use content_type with Entries supplied as the first argument I get type errors.
Entries|>content_type("hello")|>fetch_all
I know from inspecting the library code that calling the function in this way is implemented and actually supported so is not causing any actual implementation errors, but I'd like to ignore the error as a last resort. I am not sure how pervasive this @spec issue is for other functions within the library, but the workaround I have is to supply {Entries, []} as is done internally as it is captured by the current @spec annotation:
Hi all,
A super nitpicky and minor issue I am having that I hope can be addressed down the line in a future version (or hopefully this serves to be useful to someone else): I am doing a pass over my codebase using Dialyxir and I noticed that for this library many of the example usages of
Contentful.Delivery.Entries
involve a pattern of passingEntries
through to functions:However, when I use
content_type
with Entries supplied as the first argument I get type errors.I know from inspecting the library code that calling the function in this way is implemented and actually supported so is not causing any actual implementation errors, but I'd like to ignore the error as a last resort. I am not sure how pervasive this
@spec
issue is for other functions within the library, but the workaround I have is to supply{Entries, []}
as is done internally as it is captured by the current@spec
annotation:Adding
| Entries
to the typespec in the library would likely resolve the issuebut not sure whether it would be helpful to run
mix dialyzer
to capture any other errors in the same foray.The text was updated successfully, but these errors were encountered: