← All snippets
TypeScript

TypeScript Type Guard

Custom type guard for runtime type checking

TypeScript
                        function isString(val: unknown): val is string { ... }