elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Replace keyword with concrete keyword lists in specs

Open lukaszsamson opened this issue 5 months ago • 0 comments

This PR:

  • Replaces keyword/term with concrete keyword lists in specs for all functions taking options argument
  • Adds missing documentation for some of the supported options
  • Adds specs for functions with options argument

Rationale:

  • Better LSP completions. ElixirLS is able to parse specs and provide completions for keyword options
  • Dialyzer validation
  • Easier machine transformation to elixir type annotation
  • Better consistency. A big part of the API surface already had typed keyword lists.

I originally planned to do this only for public functions, but I realized that it would be better to do it for all functions taking options argument. Some of the internal ones were already documented or had specs.

lukaszsamson avatar Jun 30 '25 07:06 lukaszsamson