Skip to content

Commit

Permalink
Adding comment about Typescript bug (YAY, it wasn't me being dumb wit…
Browse files Browse the repository at this point in the history
…h TS for once)
  • Loading branch information
ramonjd committed Oct 9, 2022
1 parent 2e06a67 commit 9d5cfe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/components/src/font-size-picker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ export function getSelectedOption(
);

const selectedOption = fontSizeOptions
? // @ts-ignore @TODO fix types for fontSizeOptions. Array.find() works on the same type only.
? // @TODO Array.find() triggers error on array types unions. It's a bug. See: https://github.com/microsoft/TypeScript/issues/44373.
// @ts-ignore
fontSizeOptions.find(
( option: FontSizeSelectOption ) => option.size === value
) // @ts-ignore
Expand Down

0 comments on commit 9d5cfe7

Please sign in to comment.