Properties
queue
queue: T[]
Methods
clear
Returns void
destroy
Returns void
filter
- filter(fn: ((a: T) => boolean)): T[]
Parameters
fn: ((a: T) => boolean)
Parameters
Returns boolean
Returns T[]
push
Parameters
Returns void
sort
- sort(compareFn: ((a: T, b: T) => number), from?: number, to?: number): T[]
Parameters
compareFn: ((a: T, b: T) => number)
Optional from: number
Optional to: number
Returns T[]
traves
- traves<P>(fn: ((a: T, index?: number, queue?: T[]) => P)): P[]
Type Parameters
Parameters
fn: ((a: T, index?: number, queue?: T[]) => P)
- (a: T, index?: number, queue?: T[]): P
Parameters
a: T
Optional index: number
Optional queue: T[]
Returns P
Returns P[]
队列