FeliciousX / vue-directive-long-press

Vue Directive for Long Press
MIT License
21 stars 9 forks source link

Fix: type missmatch using LongPressHTMLElement #6

Closed naeramarth7 closed 5 years ago

naeramarth7 commented 5 years ago

Set a different default value ('') for longPressTimeoutId, since null is not allowed and cannot be used with parseInt.

FeliciousX commented 5 years ago

hi @naeramarth7 , thanks for all the contribution! Didn't know about pointer events until you came by !

for this case, however, I tried running parseInt( null ) and parseInt( '' ), the result is the same.

Do you think we should instead do '0' as default?

FeliciousX commented 5 years ago

Closing PR was accidental, sorry

naeramarth7 commented 5 years ago

Happy to help (:

The result is the same, right. Though the property is correctly defined as a string. Thus TypeScript complains about assigning 'null' to a value that must be a string.

That's basically why I propose changing this to ''. '0' should work as well though.

FeliciousX commented 5 years ago

thanks ! :)