Fact class
Builder class to simplify creating a list of facts for a card like a receipt.
Constructors
Fact(Session) | Creates a new Fact. |
Methods
create(Session, string, Text |
Creates a new Fact. |
key(Text |
Display name of the fact. |
to |
Returns the JSON for the fact. |
value(string) | Display value of the fact. |
Constructor Details
Fact(Session)
Creates a new Fact.
new Fact(session?: Session)
Parameters
- session
- Session
(Optional) will be used to localize any text.
Method Details
create(Session, string, TextType)
Creates a new Fact.
static function create(session: Session, value: string, key?: TextType)
Parameters
- session
- Session
- value
-
string
- key
- TextType
Returns
key(TextType, any[])
Display name of the fact.
function key(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]