A function that checks the input object against a specific type.
type Foo {
bar: number
}
function isFoo(obj: any): obj is Foo {
const _obj: Partial<Foo> | null | undefined = obj
return typeof _obj?.bar === "number"
}
Generated using TypeDoc
The type to check against