Exploring Graphs with Elixir:

Title: Name of book: Exploring graphs with Elixir B4 (48)

The spec for to_png doesn’t match the implementation.

According to the spec, the output type should be a string, but the output is a tuple.

This is the problem message I get from the ElixirLS VS Code extension

The @spec for the function does not match the success typing of the function.

Function:
NativeGraph.Format.to_png/2

Success typing:
@spec to_png(%GraphCommons.Graph{:path => binary(), _ => _}, atom()) :: {_, binary() | pos_integer()}