TagScript
classes
Response

Class: Response

An object containing information on a completed TagScript process.

Constructors

new Response()

new Response(variables, keyValues): Response

Parameters

variables= {}

keyValues: IKeyValues= {}

Returns

Response

Source

lib/Interpreter/Response.ts:40

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;
	}
}

Source

lib/Interpreter/Response.ts:36


body

body: null | string

The cleaned message with all tags interpreted.

Source

lib/Interpreter/Response.ts:15


keyValues

keyValues: IKeyValues

Source

lib/Interpreter/Response.ts:38


raw

raw: string

The raw string that was used to generate this response.

Source

lib/Interpreter/Response.ts:10


variables

variables: object

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

Index signature

[key: string]: ITransformer

Source

lib/Interpreter/Response.ts:20

Methods

setValues()

setValues(output, raw): Response

Parameters

output: string

raw: string

Returns

Response

Source

lib/Interpreter/Response.ts:47


toJSON()

toJSON(): object

Returns

object

actions

actions: IActions

body

body: null | string

keyValues

keyValues: IKeyValues

raw

raw: string

variables

variables: object

Index signature

[key: string]: ITransformer

Source

lib/Interpreter/Response.ts:55