What do you want to save?
Add Code snippet
New code examples in category TypeScript
-
-
Bramble Inhabitant 2021-09-05 20:34:02
object is possibly
const response = await fetchTodos(); console.log(response.data) // object is possibly undefined // optional chaining console.log(response?.data) // simple null check if (response && response.data) console.log(response.data) Add solution -
Best helpers
Insane
+5
OlegSerov
+5
Paola Garcia
+5
SweetSweet
+5
Amauri
+5
Judi
+5
Omar Kooheji
+5
Leshui
+5
JoshuaFicy
+5
TheLimper
+5
Kenneth Duda
+5