title: How to typespec sigils in elixir?
body: <blockquote>
  <p>the code was edited after the answer of Aleksei Matiushkin to include the @type</p>
  </blockquote>
  <p>I'm trying to <code>typespec</code> a sigil specifically a Regex sigil but the current elixir doc don't specify how.</p>
  <p>My code is close of:</p>
  <pre><code>defmodule M do
    @type pattern :: ??
    @type input :: String.t()
    @type current :: non_neg_integer()
  
    def tokenize_pattern(pattern, input, current) do
      # ...
    end
  end
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code>iex&gt; M.tokenize_pattern(~r/[0-9]/u, &quot;123 hello&quot;, 0)
  </code></pre>