Skip to main content

Class: LaxUndefined

An Undefined type that evaluates to an empty string or 0, and can be indexed and iterated over without error.

Extends

Constructors

new LaxUndefined()

new LaxUndefined(name, object?, hint?): LaxUndefined

Create a new Undefined object.

Parameters

name: string

The name of the undefined variable.

object?: unknown

The target object which does not have a property with the given name.

hint?: string

Optionally override the default "undefined" message.

Returns

LaxUndefined

Inherited from

Undefined.constructor

Defined in

src/undefined.ts:17

Properties

hint?

readonly optional hint: string

Optionally override the default "undefined" message.

Inherited from

Undefined.hint

Defined in

src/undefined.ts:20


name

readonly name: string

The name of the undefined variable.

Inherited from

Undefined.name

Defined in

src/undefined.ts:18


object?

readonly optional object: unknown

The target object which does not have a property with the given name.

Inherited from

Undefined.object

Defined in

src/undefined.ts:19

Accessors

first

get first(): this

Returns

this

Defined in

src/undefined.ts:126


last

get last(): this

Returns

this

Defined in

src/undefined.ts:130


size

get size(): this

Returns

this

Defined in

src/undefined.ts:134

Methods

[iterator]()

[iterator](): Iterator<unknown, any, undefined>

Returns

Iterator<unknown, any, undefined>

Defined in

src/undefined.ts:112


[liquidDispatchSync]()

[liquidDispatchSync](): LaxUndefined

Returns

LaxUndefined

Defined in

src/undefined.ts:108


[liquidDispatch]()

[liquidDispatch](): Promise<LaxUndefined>

Returns

Promise<LaxUndefined>

Defined in

src/undefined.ts:105


[toPrimitive]()

[toPrimitive](hint): null | 0 | ""

Parameters

hint: string

Returns

null | 0 | ""

Defined in

src/undefined.ts:116


poke()

poke(): void

Prompt the undefined type to throw an error.

Returns

void

Overrides

Undefined.poke

Defined in

src/undefined.ts:97


toString()

toString(): string

Returns

string

Overrides

Undefined.toString

Defined in

src/undefined.ts:93


valueOf()

valueOf(): string

Returns the primitive value of the specified object.

Returns

string

Defined in

src/undefined.ts:101


from()

static from(name): LaxUndefined

Parameters

name: string

Returns

LaxUndefined

Defined in

src/undefined.ts:89