MCPcopy
hub / github.com/basarat/typescript-book / isFoo

Function isFoo

code/types/typeGuard.ts:83–85  ·  view source on GitHub ↗

* User Defined Type Guard!

(arg: any)

Source from the content-addressed store, hash-verified

81 * User Defined Type Guard!
82 */
83 function isFoo(arg: any): arg is Foo {
84 return arg.foo !== undefined;
85 }
86
87 /**
88 * Sample usage of the User Defined Type Guard

Callers 1

doStuffFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected