Skip to content

Home > @esengine/ecs-framework-monorepo > SparseSet > map

SparseSet.map() method

映射集合中的所有元素

Signature:

typescript
map<U>(callback: (item: T, index: number) => U): U[];

Parameters

Parameter

Type

Description

callback

(item: T, index: number) => U

映射回调函数

Returns:

U[]

映射后的新数组

基于 MIT 许可证发布