wooorm / module-exports

Get the exports of a module
MIT License
12 stars 0 forks source link

Check exposed types, warn if too simple or too complex #9

Open wooorm opened 7 months ago

wooorm commented 7 months ago

An exposed type that is very simple, such as a primitive (string) or a builtin generic over a primitive (Array<string>), should be warned for. It is better to not expose it to decrease the API surface.

Builtin generics over more complex types, such as Record<string, SomeType> should also be warned for. It is better to expose only SomeType.