HackerTrans
トップ新着トレンドコメント過去質問紹介求人

throway232lasdf

no profile record

コメント

throway232lasdf
·4 年前·議論
> 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 年前·議論


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