OfficeDev / BotBuilder-MicrosoftTeams

Microsoft Bot Builder extension library for developing bots for Microsoft Teams
MIT License
256 stars 150 forks source link

botbuilder-teams does not work in TypeScript projects with the strict compilation option #168

Open wictorwilen opened 5 years ago

wictorwilen commented 5 years ago

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.

bryceg commented 5 years ago

Can a fix get pushed for this? Very annoying to not be able to use strict mode on projects.