When using botbuilder-teams in a TypeScript/node.js project and you have strict type checking set to true, you get the following error:
node_modules/botbuilder-teams/lib/botbuilder-teams.d.ts:1308:63 - error TS2339: Property '0' does not exist on type '(ISubmitAction | IOpenUrlAction | IShowCardAction)[] | undefined'.
1308 export type IAdaptiveCardAction = ac.IAdaptiveCard['actions'][0];
In adaptivecards the actions property is defined as actions? - that is, it can be undefined - and that's why your type alias fails.
When using botbuilder-teams in a TypeScript/node.js project and you have
strict
type checking set to true, you get the following error:In adaptivecards the
actions
property is defined asactions?
- that is, it can be undefined - and that's why your type alias fails.