TypeDoc API
TagScript
classes
Stopparser

Class: StopParser

The stop tag stops tag processing if the given parameter is true. If a message is passed to the payload it will return that message.

Aliases: halt, stop

Example

{stop({args}!=10):You didn't provided valid input.}

Hierarchy

Implements

Constructors

constructor

new StopParser()

Overrides

BaseParser.constructor

Properties

acceptedNames

Protected acceptedNames: string[]

Inherited from

BaseParser.acceptedNames


requiredParameter

Protected requiredParameter: boolean

Inherited from

BaseParser.requiredParameter


requiredPayload

Protected requiredPayload: boolean

Inherited from

BaseParser.requiredPayload

Methods

parse

parse(ctx): string

Parses the given tag.

Parameters

NameTypeDescription
ctxContextThe context of the tag.

Returns

string

Implementation of

IParser.parse


willAccept

willAccept(ctx): boolean

Whether the parser can handle the given tag.

Parameters

NameTypeDescription
ctxContextThe context of the tag.

Returns

boolean

Implementation of

IParser.willAccept

Inherited from

BaseParser.willAccept