@robbiemu/handy-typescript / Modules / BetweenBuilder
Description
general factory helper to populate a generator with a collection of values
• new BetweenBuilder(generator, arity)
| Name | Type |
|---|---|
generator |
Function |
arity |
number |
src/utility/between-builder.ts:14
• Private arity: number
src/utility/between-builder.ts:14
• bounds: List<unknown>
src/utility/between-builder.ts:12
• Private generator: Function
src/utility/between-builder.ts:14
▸ and(this, value): any
Method
and
Description
add a bound to the collection of bounds, optionally completing the factory setup by executing the generator function
| Name | Type |
|---|---|
this |
BetweenBuilder |
value |
unknown |
any
either this BetweenBuilder or the result of the generator function if all bounds have been collected
src/utility/between-builder.ts:52
▸ between(value): BetweenBuilder
Method
between
Description
add a bound to the collection of bounds, optionally completing the factory setup by executing the generator function
| Name | Type |
|---|---|
value |
unknown |
either this BetweenBuilder or the result of the generator function if all bounds have been collected
src/utility/between-builder.ts:65
▸ setBounds(bounds): BetweenBuilder
Method
bounds
Description
add bounds to the collection of bounds, optionally completing the factory setup by executing the generator function
| Name | Type |
|---|---|
bounds |
unknown[] |
either this BetweenBuilder or the result of the generator function if all bounds have been collected
src/utility/between-builder.ts:78
▸ Static assertBeforeWithInitialValue(this): void
Static
Method
assertBeforeWithInitialValue
Description
static psuedo-private method used in decorator to assert that the method is called after setting an initial value
| Name | Type |
|---|---|
this |
BetweenBuilder |
void
src/utility/between-builder.ts:31
▸ Static build(generator, arity?): BetweenBuilder
Static
Method
build
| Name | Type | Default value | Description |
|---|---|---|---|
generator |
Function |
undefined |
function accepting bounds |
arity |
number |
2 |
- |
src/utility/between-builder.ts:22
▸ Static completeBefore(this): void
Static
Method
completeBefore
Description
static psuedo-private method used in decorator to detect completion of setting the first value, deleting the between method
| Name | Type |
|---|---|
this |
BetweenBuilder |
void