Utils / arrayIncludes
Function: arrayIncludes()
arrayIncludes<
Type,SuperType>(array:Type[] | readonlyType[],item:SuperType,fromIndex?:number):item is Type
判断某个数组是否存在一个值
Type Parameters
| Type Parameter | Default type |
|---|---|
Type | - |
SuperType | unknown |
Parameters
| Parameter | Type |
|---|---|
array | Type[] | readonly Type[] |
item | SuperType |
fromIndex? | number |
Returns
item is Type