Skip to content

Utils / arrayIncludes

Function: arrayIncludes()

arrayIncludes<Type, SuperType>(array: Type[] | readonly Type[], item: SuperType, fromIndex?: number): item is Type

判断某个数组是否存在一个值

Type Parameters

Type ParameterDefault type
Type-
SuperTypeunknown

Parameters

ParameterType
arrayType[] | readonly Type[]
itemSuperType
fromIndex?number

Returns

item is Type

MIT Licensed