Replicating airbnb following the atomic design principles...
Home > @nextbnb/common > isExperience
Checks whether a given value is an IExperience
Signature:
export declare function isExperience(arg: any): arg is IExperience;
Parameter | Type | Description |
---|---|---|
arg | any | Value to be evaluated |
Returns:
arg is IExperience
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