Skip to main content

Class: LoopExpression

Implements

Constructors

new LoopExpression()

new LoopExpression(name, iterable, limit?, offset?, cols?, reversed?): LoopExpression

Parameters

name: string

iterable: StringLiteral | RangeLiteral | Identifier

limit?: LoopArgument

offset?: LoopArgument

cols?: LoopArgument

reversed?: boolean = false

Returns

LoopExpression

Defined in

src/expression.ts:741

Properties

cols?

readonly optional cols: LoopArgument

Defined in

src/expression.ts:746


iterable

readonly iterable: StringLiteral | RangeLiteral | Identifier

Defined in

src/expression.ts:743


limit?

readonly optional limit: LoopArgument

Defined in

src/expression.ts:744


name

readonly name: string

Defined in

src/expression.ts:742


offset?

readonly optional offset: LoopArgument

Defined in

src/expression.ts:745


reversed

readonly reversed: boolean = false

Defined in

src/expression.ts:747

Methods

children()

children(): Expression[]

Returns

Expression[]

Implementation of

Expression.children

Defined in

src/expression.ts:873


drop()

protected drop(it, n): Generator<unknown, any, unknown>

Parameters

it: Iterator<unknown, any, undefined>

n: number

Returns

Generator<unknown, any, unknown>

Defined in

src/expression.ts:787


equals()

equals(other): boolean

Parameters

other: unknown

Returns

boolean

Implementation of

Expression.equals

Defined in

src/expression.ts:750


evaluate()

evaluate(context): Promise<[Iterator<unknown, any, undefined>, number]>

Parameters

context: RenderContext

Returns

Promise<[Iterator<unknown, any, undefined>, number]>

Implementation of

Expression.evaluate

Defined in

src/expression.ts:849


evaluateSync()

evaluateSync(context): [Iterator<unknown, any, undefined>, number]

Parameters

context: RenderContext

Returns

[Iterator<unknown, any, undefined>, number]

Implementation of

Expression.evaluateSync

Defined in

src/expression.ts:862


limitAndOffset()

protected limitAndOffset(context, it, length, limit, offset): [Iterator<unknown, any, undefined>, number]

Parameters

context: RenderContext

it: Iterable<unknown>

length: number

limit: unknown

offset: unknown

Returns

[Iterator<unknown, any, undefined>, number]

Defined in

src/expression.ts:800


take()

protected take(it, n): Generator<unknown, any, unknown>

Parameters

it: Iterator<unknown, any, undefined>

n: number

Returns

Generator<unknown, any, unknown>

Defined in

src/expression.ts:796


toIter()

protected toIter(obj): [Iterable<unknown>, number]

Parameters

obj: unknown

Returns

[Iterable<unknown>, number]

Defined in

src/expression.ts:771


toString()

toString(): string

Returns

string

Implementation of

Expression.toString

Defined in

src/expression.ts:762