Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration ArgdownTypes

All data objects stored in the IArgdownResponse are simple object literals implementing an interface. You can simply instantiate an argument, statement or relation by creating an object literal and adding properties to it.

To support runtime type checking, each of these objects has a required obj.type property with its own ArgdownTypes member as type. Typescript will automatically narrow the type if you check if some object's type property is equal to a specific ArgdownTypes member.

example
// Instantiate a new statement by using an object literal:
const obj = {
 type: ArgdownTypes.STATEMENT,
 title: "Some title",
 text: "Some text"
}

if(obj.type === ArgdownTypes.STATEMENT){
 // Because IStatement is the only type with ArgdownTypes.STATEMENT as type of its `type`property
 // Typescript will now know that obj is of type IStatement, you don't have to cast it explicitely.
 obj.tags = ["some tag"];
 obj.role = StatementRole.PREMISE;
}

Index

Enumeration members

ARGUMENT

ARGUMENT: = "argument"

ARGUMENT_MAP_NODE

ARGUMENT_MAP_NODE: = "argument-map-node"

EQUIVALENCE_CLASS

EQUIVALENCE_CLASS: = "equivalence-class"

GROUP_MAP_NODE

GROUP_MAP_NODE: = "group-map-node"

INFERENCE

INFERENCE: = "inference"

MAP_EDGE

MAP_EDGE: = "map-edge"

RELATION

RELATION: = "relation"

RULE_NODE

RULE_NODE: = "rule-node"

SECTION

SECTION: = "section"

STATEMENT

STATEMENT: = "statement"

STATEMENT_MAP_NODE

STATEMENT_MAP_NODE: = "statement-map-node"

STATEMENT_REFERENCE

STATEMENT_REFERENCE: = "statement-reference"

TOKEN_NODE

TOKEN_NODE: = "token-node"

Generated using TypeDoc