Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export oft-used types w/o exposing implementation
Export more types that meet these criteria: - Documented - Convenient for client code. They are already used in specs of public functions of their respective modules. - These types do not expose implementation details. The types are: ets.erl: - type() :: set | ordered_set | bag | duplicate_bag. re.erl: - mp() :: {re_pattern,_ ,_ ,_ ,_ }.* supervisor.erl: - `restart() :: 'permanent' | 'transient' | 'temporary' - `mfargs() :: {M :: module(), F :: atom(), A :: [term()] | undefined}.` - `shutdown() :: 'brutal_kill' | timeout().` The reason for this change is to fix the status quo, which is that teams either must: - copy/pasta the types into client code, leading to code bloat and having to manually keep the types in sync. - OR refer to non-exported types, which will mean either more noise or less accuracy from code analysis tools. For example, Dialyzer will either warn or treat the types as `term()`.
- Loading branch information