TypeDoc API
TagScript
classes
Response

Class: Response

An object containing information on a completed TagScript process.

Constructors

constructor

new Response(variables?, keyValues?)

Parameters

NameType
variablesObject
keyValuesIKeyValues

Properties

actions

actions: IActions

An object containing information on a completed TagScript process. If you are creating a parser where you need to store info in actions, then you need to extend this interface.

import 'tagscript';
declare module 'tagscript' {
	interface IActions {
foo?: string;
	}
}

body

body: null | string

The cleaned message with all tags interpreted.


keyValues

keyValues: IKeyValues


raw

raw: string

The raw string that was used to generate this response.


variables

variables: Object

An object with all the variables that parsers such as the LooseVarsParser can access.

Index signature

▪ [key: string]: ITransformer

Methods

setValues

setValues(output, raw): Response

Parameters

NameType
outputstring
rawstring

Returns

Response


toJSON

toJSON(): Object

Returns

Object

NameType
actionsIActions
bodynull | string
keyValuesIKeyValues
rawstring
variables{ [key: string]: ITransformer; }