@terascope/job-components / index / BigSet
Class: BigSet<T>
Avoid v8 maximum size for Set by spreading the cache across multiple Sets. This class has the same API as Set but minus more differences in ->add and ->forEach
Type parameters
Type parameter |
---|
T |
Constructors
new BigSet()
new BigSet<
T
>(values
?):BigSet
<T
>
Parameters
Parameter | Type |
---|---|
values ? | null | readonly T [] |
Returns
BigSet
<T
>
Source
packages/utils/dist/src/big-set.d.ts:11
Properties
maxMapSize
readonly
maxMapSize:number
Source
packages/utils/dist/src/big-set.d.ts:7
DEFAULT_MAX_SIZE
static
DEFAULT_MAX_SIZE:number
Source
packages/utils/dist/src/big-set.d.ts:6
Accessors
size
get
size():number
Returns
number
Source
packages/utils/dist/src/big-set.d.ts:16
Methods
[iterator]
()
[iterator]():
IterableIterator
<T
>
Returns
IterableIterator
<T
>
Source
packages/utils/dist/src/big-set.d.ts:18
add()
add(
value
):Set
<T
>
Parameters
Parameter | Type |
---|---|
value | T |
Returns
Set
<T
>
Source
packages/utils/dist/src/big-set.d.ts:12
clear()
clear():
void
Returns
void
Source
packages/utils/dist/src/big-set.d.ts:15
delete()
delete(
value
):boolean
Parameters
Parameter | Type |
---|---|
value | T |
Returns
boolean
Source
packages/utils/dist/src/big-set.d.ts:14
forEach()
forEach(
callbackFn
,thisArg
?):void
Parameters
Parameter | Type |
---|---|
callbackFn | (value , value2 , map ) => void |
thisArg ? | unknown |
Returns
void
Source
packages/utils/dist/src/big-set.d.ts:17
has()
has(
value
):boolean
Parameters
Parameter | Type |
---|---|
value | T |
Returns
boolean
Source
packages/utils/dist/src/big-set.d.ts:13