KingCambo
TTCTheo's Typesafe Cult
•Created by KingCambo on 2/22/2024 in #questions
Can still use null for required field in Prisma
Thank you sir.
7 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 2/22/2024 in #questions
Can still use null for required field in Prisma
7 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 2/22/2024 in #questions
Can still use null for required field in Prisma
Possible, let me check
7 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
indeed
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
but isn't that object literal? idk
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
I think string is still an object and has a property "length" so it passes
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
Weird?
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
thank you for the tip and nice recap
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
For other folks who might be wondering the same thing, I think I've got the answer based on below article. "To recap, excess property checking is only triggered when we define object literals with a type annotation and not in other cases."
https://dev.to/this-is-learning/understanding-excess-property-checking-in-typescript-ook
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
Appreciate you a lot for taking the time to answer.
Don't mind me but I think the explanation doesn't make sense with my second screenshot, as the property "year" also exist in the object but typescript still throw an error.
17 replies
TTCTheo's Typesafe Cult
•Created by KingCambo on 3/16/2023 in #questions
Confusion: Type annotation/ Type conversion
17 replies