-
Notifications
You must be signed in to change notification settings - Fork 0
/
type.go
30 lines (21 loc) · 841 Bytes
/
type.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package jsarray
// ForEachFunc is ForEach callback function type
type ForEachFunc func(item interface{}, index int, array []interface{})
// FilterFunc is Filter callback function type
type FilterFunc func(item interface{}, index int, array []interface{}) bool
// MapFunc is Map callback function type
type MapFunc func(item interface{}, index int, array []interface{}) interface{}
// ReduceFunc is Reduce callback function type
type ReduceFunc func(accumulator, currentValue interface{}, currentIndex int, array []interface{}) interface{}
// LessFunc is Less callback function type
type LessFunc func(firstEl, secondEl interface{}) bool
// Array struct
// type Array struct {
// _array []interface{}
// _type reflect.Type
// _sorter Sorter
// }
// Array type
type Array []interface{}
// type Itf interface{}
// type Aritf []Itf