Skip to main content

TextType and TextListType

  • These classes represent the "text" and "text-list" data types respectively

  • TextType should be called with a single argument of type string.

const greeting = new TextType("Hello, world");
  • TextListType should be called with a single argument that is an array of TextType instances
const person1 = new TextType("Jane");
const person2 = new TextType("John");

const people = new TextListType([person1, person2]);