Skip to content

Commit

Permalink
Use union type for interactionType property (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Selindek authored Aug 9, 2023
1 parent 900e86f commit 6b690b4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion projects/ngx-xapi/model/src/lib/activity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
import { Extensions } from './extensions';
import { LanguageMap } from './language-map';

type InteractionType =
| 'true-false'
| 'choice'
| 'fill-in'
| 'long-fill-in'
| 'matching'
| 'performance'
| 'sequencing'
| 'likert'
| 'numeric'
| 'other';

/**
* This interface represents the xAPI Activity Definition object.
*
Expand Down Expand Up @@ -39,7 +51,7 @@ export interface ActivityDefinition {
/**
* The type of interaction.
*/
interactionType?: string;
interactionType?: InteractionType;

/**
* A pattern representing the correct response to the interaction. The structure of this pattern
Expand Down

0 comments on commit 6b690b4

Please sign in to comment.