#New to TS, need some help setting up next auth / code sandbox attached

20 messages · Page 1 of 1 (latest)

heady acorn
#

@worn ibex I'm not sure what you're asking - you wrote types and were getting errors, so you deleted all the types and are asking for help with the errors?

worn ibex
#

Sorry

#

What i meant was I deleted what i had done trying to make types work

#

So this example is brand new without any of my mess attempt

heady acorn
#

Okay, which of these errors did you need help with?

#

There's a lot here and short of just... writing all the types, I'm not sure how to help.

worn ibex
#

Haha just the lint

#

How do I stop the editor from complaining that types are null or do not exist?

heady acorn
#

You need to verify that those values exist

worn ibex
#

They do exist

#

But when I write the type it displays same lint

heady acorn
#

They may not exist in all cases. I assume useSession sometimes returns undefined because there isn't always a session

worn ibex
#

Ok I I’ll do the something. I wil rewrite with my take of what i am trying to accomplish

#

That will give you a better understanding

heady acorn
#

selectedUser also. It's initially null (you also need to provide the type for when it isn't null) and you're accessing properties without checking if it's null first.

worn ibex
#

Yeah… the thing is that i have little to no clue on how to do it

#

I am trying to learn on the go with basic stuff

#

Can I msg you tomorrow?

#

My wife is nagging me :p

heady acorn
#

You can post in this channel and I may see it.