Skip to main content

Class: ArgumentStream

lexure/src.ArgumentStream

Constructors

constructor

new ArgumentStream(results)

Parameters

NameType
resultsParserResult

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:9

Properties

results

Readonly results: ParserResult

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:6


state

state: State

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:7

Accessors

finished

get finished(): boolean

Returns

boolean

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:17


length

get length(): number

Returns

number

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:24


remaining

get remaining(): number

Returns

number

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:31


used

get used(): number

Returns

number

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:38

Methods

filter

filter(predicate, from?): Option<string[]>

Parameters

NameType
predicate(value: string) => boolean
fromnumber

Returns

Option<string[]>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:497


filterAsync

filterAsync(predicate, from?): Promise<Option<string[]>>

Parameters

NameType
predicate(value: string) => Promise<boolean>
fromnumber

Returns

Promise<Option<string[]>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:514


filterMap

filterMap<T>(predicate, from?): Option<T[]>

Type parameters

Name
T

Parameters

NameType
predicate(value: string) => Option<T>
fromnumber

Returns

Option<T[]>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:531


filterMapAsync

filterMapAsync<T>(predicate, from?): Promise<Option<T[]>>

Type parameters

Name
T

Parameters

NameType
predicate(value: string) => Promise<Option<T>>
fromnumber

Returns

Promise<Option<T[]>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:549


find

find(predicate, from?): Option<string>

Parameters

NameTypeDescription
predicate(value: string) => boolean
fromnumber

Returns

Option<string>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:248


findAsync

findAsync(predicate, from?): Promise<Option<string>>

Parameters

NameTypeDescription
predicate(value: string) => Promise<boolean>
fromnumber

Returns

Promise<Option<string>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:282


findMap

findMap<T>(predicate, from?): Option<T>

Type parameters

NameDescription
T-

Parameters

NameTypeDescription
predicate(value: string) => Option<T>
fromnumber

Returns

Option<T>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:317


findMapAsync

findMapAsync<T>(predicate, from?): Promise<Option<T>>

Type parameters

NameDescription
T-

Parameters

NameTypeDescription
predicate(value: string) => Promise<Option<T>>
fromnumber

Returns

Promise<Option<T>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:353


findParse

findParse<T, E>(predicate, from?): Result<T, E[]>

Type parameters

NameDescription
T-
E-

Parameters

NameTypeDescription
predicate(value: string) => Result<T, E>
fromnumber

Returns

Result<T, E[]>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:405


findParseAsync

findParseAsync<T, E>(predicate, from?): Promise<Result<T, E[]>>

Type parameters

NameDescription
T-
E-

Parameters

NameTypeDescription
predicate(value: string) => Promise<Result<T, E>>
fromnumber

Returns

Promise<Result<T, E[]>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:437


flag

flag(...keys): boolean

Parameters

NameTypeDescription
...keysreadonly string[]

Returns

boolean

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:587


many

many(limit?, from?): Option<Parameter[]>

Parameters

NameTypeDefault valueDescription
limitnumberInfinity
fromnumberundefined

Returns

Option<Parameter[]>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:478


option

option(...keys): Option<string>

Parameters

NameTypeDescription
...keysreadonly string[]

Returns

Option<string>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:610


options

options(...keys): Option<readonly string[]>

Parameters

NameTypeDescription
...keysreadonly string[]

Returns

Option<readonly string[]>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:633


reset

reset(): void

Returns

void

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:654


restore

restore(state): void

Parameters

NameType
stateState

Returns

void

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:650


save

save(): State

Returns

State

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:643


single

single(): Option<string>

Returns

Option<string>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:64


singleMap

singleMap<T>(predicate, useAnyways?): Option<T>

Type parameters

NameDescription
T-

Parameters

NameTypeDefault valueDescription
predicate(value: string) => Option<T>undefined
useAnywaysbooleanfalse

Returns

Option<T>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:107


singleMapAsync

singleMapAsync<T>(predicate, useAnyways?): Promise<Option<T>>

Type parameters

NameDescription
T-

Parameters

NameTypeDefault valueDescription
predicate(value: string) => Promise<Option<T>>undefined
useAnywaysbooleanfalse

Returns

Promise<Option<T>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:133


singleParse

singleParse<T, E>(predicate, useAnyways?): Result<T, null | E>

Type parameters

NameDescription
T-
E-

Parameters

NameTypeDefault valueDescription
predicate(value: string) => Result<T, E>undefined
useAnywaysbooleanfalse

Returns

Result<T, null | E>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:185


singleParseAsync

singleParseAsync<T, E>(predicate, useAnyways?): Promise<Result<T, null | E>>

Type parameters

NameDescription
T-
E-

Parameters

NameTypeDefault valueDescription
predicate(value: string) => Promise<Result<T, E>>undefined
useAnywaysbooleanfalse

Returns

Promise<Result<T, null | E>>

Defined in

projects/utilities/packages/lexure/src/lib/ArgumentStream.ts:212