react-restart / ui

MIT License
132 stars 22 forks source link

fix(Button): remove redundant undefined #63

Closed fabrv closed 2 years ago

fabrv commented 2 years ago

Removed | undefined in optional parameters because the undefined type is inherent of optional parameters.

kyletsang commented 2 years ago

Hey @fabrv, this is actually intentional and is used to support the --exactOptionalPropertyTypes flag in TS.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html#exact-optional-property-types---exactoptionalpropertytypes