Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit c5bf14c

Browse files
enzocanodarrenj
authored andcommitted
Allow ITriggers with nullable properties (#1685)
1 parent 51c8187 commit c5bf14c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/typescript/botbuilder-skills/src/models/skillManifest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ export interface IActionDefinition {
4545
* Definition of the triggers for a given action within a Skill.
4646
*/
4747
export interface ITriggers {
48-
utterances: IUtterance[];
48+
utterances?: IUtterance[];
4949
utteranceSources: IUtteranceSources[];
50-
events: IEvent[];
50+
events?: IEvent[];
5151
}
5252

5353
/**

lib/typescript/botbuilder-skills/src/skillManifestGenerator.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ export class SkillManifestGenerator {
134134
});
135135
});
136136

137+
if (action.definition.triggers.utterances === undefined) {
138+
action.definition.triggers.utterances = [];
139+
}
140+
137141
action.definition.triggers.utterances.push({
138142
locale: utteranceSource.locale,
139143
text: utterancesToAdd

0 commit comments

Comments
 (0)