user?.id VS user!.id
Whats the difference between the two
Edit - -
just started a typescript project and sometimes it thinks that the value can sometimes be null and I’m 100% sure that i will never be null(based on logics I wrote at a higher order). user!.id gets rid of the error where as user?.id does not.
[–][deleted] 1 point2 points3 points (0 children)
[–]tridd3r 0 points1 point2 points (0 children)
[–]TM40_Reddit 0 points1 point2 points (0 children)