Type guard to check if an arbitrary object conforms to the InputFile interface.
Object or value to check.
true if obj is an InputFile, false otherwise.
true
obj
false
if (isInputFile(payload.photo)) { console.log("Found file upload:", payload.photo.filename);} Copy
if (isInputFile(payload.photo)) { console.log("Found file upload:", payload.photo.filename);}
Type guard to check if an arbitrary object conforms to the InputFile interface.