Un atelier TypeScript · Édition d'ApprentissageA TypeScript Workshop · Learning Edition

unknown, l'inconnu honnête, ou je ne sais pas, alors prouve-le unknown, the honest unknown, or I don't know, so prove it

unknown dit la même chose qu'any — « je ne connais pas ce type » — mais ferme la porte à clé au lieu de l'arracher. Tout monte dans unknown, rien n'en redescend sans preuve : impossible de lire, d'appeler, d'assigner, sans avoir d'abord rétréci. C'est le type top, miroir du never. Le défaut honnête au catch et à la frontière — à condition de le franchir par un check, jamais par un as. unknown says what any says — 'I don't know this type' — but locks the door instead of tearing it off. Everything flows up into unknown, nothing flows back down without proof: you can't read, call, or assign before narrowing. It's the top type, the mirror of never. The honest default in catch and at the boundary — provided you cross it by a check, never an as.

AudienceAudience
Dev qui a vu le trou d'any et veut l'aveu honnête qui force la preuve Dev who saw any's hole and wants the honest admission that forces proof
Format
Self-paced
ChapitresChapters
5
Date
Juin 2026 Jun 2026
≈ 18 min ●●○○ unknownNarrowingTradeoff
🔒

La suite est réservée The rest is members-only

Le premier numéro est libre. Débloque tout The TypeScript Loop — tous les volumes, à vie — pour 5 €, paiement unique. The first issue is free. Unlock all of The TypeScript Loop — every volume, forever — for €5, one-time.

Retour au kiosqueBack to newsstand