4irbnb

Replicating airbnb following the atomic design principles...

View the Project on GitHub kokiebisu/4irbnb

Home > @nextbnb/common > isExperience

isExperience() function

Checks whether a given value is an IExperience

Signature:

export declare function isExperience(arg: any): arg is IExperience;

Parameters

Parameter Type Description
arg any Value to be evaluated

Returns:

arg is IExperience

Example

Here’s an example of how to use this guard

const experience = { id: '1', title: 'Cozy fireplace condo', imgUrl: ['www.imgUrl.com/1', ['www.imgUrl.com/2']] }
isExperience(experience); // true