Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
addTextBlock(text: string, template: Partial, container: Container = this.container) {
if (typeof text !== 'undefined') {
const textblock = new TextBlock();
// tslint:disable-next-line:forin
for (const prop in template) {
textblock[prop] = template[prop];
}
textblock.text = text;
container.addItem(textblock);
}
}
addTextBlock(text, template, container) {
container = container || this.container;
if (typeof text !== 'undefined') {
const textblock = new adaptivecards_1.TextBlock();
for (let prop in template) {
textblock[prop] = template[prop];
}
textblock.text = text;
container.addItem(textblock);
}
}
addButtons(cardActions, includesOAuthButtons) {
addTextBlock(text: string, template: Partial, container?: Container) {
container = container || this.container;
if (typeof text !== 'undefined') {
const textblock = new TextBlock();
for (let prop in template) {
(textblock as any)[prop] = (template as any)[prop];
}
textblock.text = text;
container.addItem(textblock);
}
}