ஒரு user-defined type guard என்பது ஒரு type predicate (x is T) என்ற return type கொண்ட function ஆகும். அது true என்று திரும்பும்போது, compiler அந்த argument-ஐ calling code-இல் T-ஆக narrow செய்கிறது — இதன் மூலம் தனிப்பயன் runtime சரிபார்ப்புகளை நீங்கள் encapsulate செய்யலாம்.
