All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.2.2 - 2023-10-31
- fixed CHANGELOG formatting and README example
- added warning to README to not use constraints
2.2.1 - 2023-07-12
- cleaned up dependencies, fixed liscense.
2.2.0 - 2023-07-04
- removed the union trick from
AsProps, because of this we also remove un-needed parameters. - removed
Defaultparameter fromPolymorphicPropsWithRefandPolymorphicPropsWithoutRef.
- fixed
PolymorphicPropsWithRefnot usingFastComponentPropsWithRef. - fixed (#6) by removing the union trick from
AsProps, hopefully this won't stir trouble in the future and that typescript will keep inferring events correctly.
2.1.1 - 2023-04-13
- Added .npmignore to exclude examples folder
- edited README.md to fix
forwardRefexamples cause I forgot to add the ref attributes, also added a FAQ for (#5). - edited examples to have ref placed in.
- edited comment on
index.d.tsto make it up to date.
2.1.0 - 2023-01-22
-
added
OnlyAs<T>to fix (#3) by changing known props to unknown (ex. "button" | "a"). -
added
PolymorphicPropsWithoutRef<D, T, P>andPolymorphicPropsWithRef<D, T, P>as an alternative to usingPolymorphicComponent, this is useful if user doesn't want to use arrow functions. -
added CHANGELOG.md
- constraints lead to error on @types/react^17. (#3)
- edited README.md to fix typos as well as providing new information regarding added types.
2.0.1 - 2023-01-10
- stopped utility types from being implicitly exported.
2.0.0 - 2023-01-10
-
PolymorphicComponent<T, P, R>no longer needsRto be typed withRestrict<T>, instead,Ris now for adding your own constraints toT. -
PolyForwardMemoExoticComponent<T>was shortened toPolyForwardMemoComponent<T>, this is the same for other exotic components.
- removed
Restrict<T>. Checking if the props ofaswas valid and changing it toneverfelt too clunky.
1.0.0 - v1.1.2
These versions did not support changelog and is a bit messy to go through, since this package wasn't mature in this state anyways I figured I don't need to tag these versions as only a few had downloaded the package.
- Typings for polymorphic components.
- Typings to support exotic components.
- Restrict API to constraint
asand if props ofasare valid.