Skip to content

Commit dfab86e

Browse files
committed
make Question types externally available
1 parent 7084ff2 commit dfab86e

File tree

1 file changed

+66
-2
lines changed

1 file changed

+66
-2
lines changed

packages/courses/src/index.ts

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,74 @@
11
import { markRaw } from 'vue';
22
import { Course } from './Course';
3-
import { Displayable, ViewComponent } from '@vue-skuilder/common-ui';
4-
import { DataShape, NameSpacer, ShapeDescriptor, ViewDescriptor } from '@vue-skuilder/common';
3+
import {
4+
Displayable,
5+
Question,
6+
ViewComponent,
7+
} from '@vue-skuilder/common-ui';
8+
import {
9+
DataShape,
10+
NameSpacer,
11+
ShapeDescriptor,
12+
ViewDescriptor,
13+
ViewData,
14+
Answer,
15+
Evaluation,
16+
} from '@vue-skuilder/common';
517

618
import defaultCourse from './default';
719

20+
/**
21+
* A `Course` is a container for a set of related `Question` types.
22+
*/
23+
export { Course };
24+
25+
26+
/**
27+
* The base class for all interactive course content.
28+
* A `Displayable` defines the data it requires and the Vue components used to render it.
29+
*/
30+
export { Displayable };
31+
32+
/**
33+
* The base class for all questions. It extends `Displayable` and adds
34+
* logic for evaluating user answers. This is the primary class developers
35+
* will extend to create new question types.
36+
*/
37+
export { Question };
38+
39+
/**
40+
* A type representing a Vue component that can be used to render a `Displayable`.
41+
*/
42+
export type { ViewComponent };
43+
44+
45+
46+
/**
47+
* Represents the actual data passed to a `Displayable`'s constructor.
48+
*/
49+
export type { ViewData };
50+
51+
/**
52+
* Represents a user's answer to a `Question`.
53+
*/
54+
export type { Answer };
55+
56+
/**
57+
* Represents the evaluation of a user's `Answer`.
58+
*/
59+
export type { Evaluation };
60+
61+
/**
62+
* A descriptor that uniquely identifies a `ViewComponent`.
63+
*/
64+
export type { ViewDescriptor };
65+
66+
/**
67+
* A descriptor that uniquely identifies a `DataShape`.
68+
*/
69+
export type { ShapeDescriptor };
70+
71+
872
import chess from './chess';
973
import french from './french';
1074
import math from './math';

0 commit comments

Comments
 (0)