#exhaustive — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #exhaustive, aggregated by home.social.
-
https://www.europesays.com/afrique/162561/ Le Maroc appelle à une enquête exhaustive après la mort d’un ressortissant marocain à Bologne #à #AbderrahimFakir #appelle #après #Atlasinfo #Bologne #d’un #EnDirect #enquête #exhaustive #GiorgiaMeloni #International #Italie #la #le #LeMarocAppelleàUneEnquêteExhaustiveAprèsLaMortD’unRessortissantMarocainàBologne #Maroc #marocain #MarocainsRésidantàL'étranger #MinistèreDesAffairesétrangères #mort #Pilastro #ressortissant #Société #une #YoussefBalla
-
TypeScript nicety. A variable's type is a union of classes:
declare const aorb: A | B
You want to handle each class separately with a sequence like
if (aorb instanceof A) { }
else if (aorb instanceof B) { }You also want to be sure that if another class is added you don't forget to amend the if-cascade. Just add:
else { throw aorb satisfies never; }
Full code on playground. Can this be done with switch too?
-
TypeScript nicety. A variable's type is a union of classes:
declare const aorb: A | B
You want to handle each class separately with a sequence like
if (aorb instanceof A) { }
else if (aorb instanceof B) { }You also want to be sure that if another class is added you don't forget to amend the if-cascade. Just add:
else { throw aorb satisfies never; }
Full code on playground. Can this be done with switch too?
-
TypeScript nicety. A variable's type is a union of classes:
declare const aorb: A | B
You want to handle each class separately with a sequence like
if (aorb instanceof A) { }
else if (aorb instanceof B) { }You also want to be sure that if another class is added you don't forget to amend the if-cascade. Just add:
else { throw aorb satisfies never; }
Full code on playground. Can this be done with switch too?
-
TypeScript nicety. A variable's type is a union of classes:
declare const aorb: A | B
You want to handle each class separately with a sequence like
if (aorb instanceof A) { }
else if (aorb instanceof B) { }You also want to be sure that if another class is added you don't forget to amend the if-cascade. Just add:
else { throw aorb satisfies never; }
Full code on playground. Can this be done with switch too?
-
@RoundSparrow @suqdiq or people that just live to argue for the sake of argument.
Playing devil's advocate is an #exhaustive #exercise that has no end.
Can't do it, life's too short. I'll stick to my beliefs, you can keep yours. Whatever they are.
#ShariLewis #Song #TheSongThatDoesntEnd #LambChop #MuzakLessons