Langues

Clavier

Type Guard

Validate unknown values with a predicate.

Difficulte: Intermediaire · 15 Lignes · Licence: public-domain

Temps Restant5:00
Score0
Joueur AutoPrimeSpark913
type User = {
  id: number;
  name: string;
  email: string;
};
function isUser(value: unknown): value is User {
  if (!value || typeof value !== 'object') return false;
  const v = value as Record<string, unknown>;
Temps0:00
Vitesse (WPM)0.0
Précision100.0%
Erreurs0

Clavier Live

Touche Suivante: T | Dernière Touche: -

Progression: 0.0%
@
&
É
"
'
(
§
È
!
Ç
À
)
-
A
Z
E
R
T
Y
U
I
O
P
^
$
Q
S
D
F
G
H
J
K
L
M
Ù
W
X
C
V
B
N
,
;
:
=
Espace

Timed Test Leaderboard

Aucun resultat pour le moment.