HackerTrans
TopNewTrendsCommentsPastAskShowJobs

throway232lasdf

no profile record

comments

throway232lasdf
·4년 전·discuss
> Why is it better to have two email types, VerifiedEmail and UnverifiedEmail vs. one Email type with an "isVerified" field?

You obviously have no idea what a type is.

    type VerifiedEmail = { email: string; is_verified: true; };

    type UnverifiedEmail = { email: string; is_verified: false; };
throway232lasdf
·4년 전·discuss


    type VerifiedEmailOptedOutOfMarketing = { email: string; is_verified: true; is_opted_out: true; };