sinclairnick / brail

💌 Transactional email that feels different
https://brail.dev
Apache License 2.0
258 stars 6 forks source link

Types: Prevent `.preview` from making types stricter than necessary #28

Closed sinclairnick closed 1 year ago

sinclairnick commented 1 year ago

Currently the .preview function is generic and overrides TProps when specified after with an equal or more narrow version.

Possible solution: hide the .preview function until TProps is specified, and make .preview non-generic.

sinclairnick commented 1 year ago

.preview() is no longer generic, but is still shown, to avoid conditional types (for now).