Skip to content

fix typescript definition for class | className#3711

Merged
JoviDeCroock merged 1 commit into
preactjs:masterfrom
PodaruDragos:FIX/ts-typyes-for-classes
Sep 7, 2022
Merged

fix typescript definition for class | className#3711
JoviDeCroock merged 1 commit into
preactjs:masterfrom
PodaruDragos:FIX/ts-typyes-for-classes

Conversation

@PodaruDragos

@PodaruDragos PodaruDragos commented Sep 5, 2022

Copy link
Copy Markdown
Contributor

When using typescript's exactOptionalPropertyTypes and accessing css-modules with a index definition the class and or className must be typed to string | undefined to appease the compiler.

this fix just modifies those properties to also include undefined, which won't break anything.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 99.527% when pulling d607d05 on PodaruDragos:FIX/ts-typyes-for-classes into 803dbb5 on preactjs:master.

@JoviDeCroock JoviDeCroock merged commit a5258a9 into preactjs:master Sep 7, 2022
JoviDeCroock added a commit that referenced this pull request Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants