Better HN
topnewbestaskshowjobs
Log inSign up

throway232lasdf

0 karma · joined Nov 5, 2022 (4y ago) · 2 submissions

Submissions

comment 4y ago · link · parent

> 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; };

comment 4y ago · link · parent

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