You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, note the goofy (msg as msTeamsBuilder.TeamsMessage) cast before the botbuilder-teams addMentionToText method. If it's not there, it breaks, saying that addMentionToText is not a method of botbuilder.Message.
Which it isn't - it's a method of TeamsMessage -- but why the error? Because with the Fluent-style APIs used in botbuilder, an explicit cast back to botbuilder.Message is made with every method call (in this case, to .textFormat and .text).
The only way around this, I think, is to create wrappers for all the fluent calls in the TeamsMessage.js library which calls super. That way the objects aren't cast back to the superclass type on every method call of botbuilder.
As it stands now, this is completely mysterious and makes the SDK harder to use.
The text was updated successfully, but these errors were encountered:
Consider the following TypeScript code:
In particular, note the goofy
(msg as msTeamsBuilder.TeamsMessage)
cast before the botbuilder-teams addMentionToText method. If it's not there, it breaks, saying thataddMentionToText
is not a method ofbotbuilder.Message
.Which it isn't - it's a method of
TeamsMessage
-- but why the error? Because with the Fluent-style APIs used in botbuilder, an explicit cast back to botbuilder.Message is made with every method call (in this case, to.textFormat
and.text
).The only way around this, I think, is to create wrappers for all the fluent calls in the TeamsMessage.js library which calls super. That way the objects aren't cast back to the superclass type on every method call of botbuilder.
As it stands now, this is completely mysterious and makes the SDK harder to use.
The text was updated successfully, but these errors were encountered: