Repository navigation
Conversation
As suggested in multiple reviews
highest-rated-comment
|
Question, how come you swapped the default parameter for the null parameter and that or construct? I'm not too experienced with typescript but is there a difference? |
|
ERROR in ./source/features/highest-rated-comment.tsx(33,59):
TS2345: Argument of type 'Element' is not assignable to parameter of type 'Document'.
ERROR in ./source/features/highest-rated-comment.tsx(41,59):
TS2345: Argument of type 'Element' is not assignable to parameter of type 'Document'.Instead of changing the type of the parameter, I thought it would be easier to just make it optional and then handle its absence later in the code ( |
|
Ah I see, sorry about that, I didn't see the compile errors but since it still ran I thought it was fine. Too used to static languages 😄 I'll test this out today or tomorrow and merge, thanks for the explanation. |
|
I'll wait for another day just to be safe if you want to do anything, but I tested it out on the example cases and it works fine. |
|
I tested it as well and it seems to work correctly |
|
Thanks @CTrando! |
Closes #2190
Test
From original to make sure it still works:
leafo/sticky-kit#201
react/react#13991
flutter/flutter#11609
MrMEEE/bumblebee-Old-and-abbandoned#123
Example of likes vs hearts + likes (also my project 😃)
microsoft/python-language-server#19