Tagscript

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

Defined in

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

Defined in

Interpreter/Response.ts:36


body

body: null | string

The cleaned message with all tags interpreted.

Defined in

Interpreter/Response.ts:15


keyValues

keyValues: IKeyValues

Defined in

Interpreter/Response.ts:38


raw

raw: string

The raw string that was used to generate this response.

Defined in

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

Defined in

Interpreter/Response.ts:20

Methods

setValues()

setValues(output, raw): Response

Parameters

output: string

raw: string

Returns

Response

Defined in

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

Defined in

Interpreter/Response.ts:55

On this page