Skip to content

Commit 3ca31fe

Browse files
🤖 Merge PR DefinitelyTyped#55623 Add scorm-browser package definition by @CookieCookson
1 parent 2f73b8d commit 3ca31fe

File tree

9 files changed

+1319
-0
lines changed

9 files changed

+1319
-0
lines changed
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
/**
2+
* A single character, 0 to 9, a to z.
3+
*/
4+
export type Char =
5+
| '0'
6+
| '1'
7+
| '2'
8+
| '3'
9+
| '4'
10+
| '5'
11+
| '6'
12+
| '7'
13+
| '8'
14+
| '9'
15+
| 'a'
16+
| 'b'
17+
| 'c'
18+
| 'd'
19+
| 'e'
20+
| 'f'
21+
| 'g'
22+
| 'h'
23+
| 'i'
24+
| 'j'
25+
| 'k'
26+
| 'l'
27+
| 'm'
28+
| 'n'
29+
| 'o'
30+
| 'p'
31+
| 'q'
32+
| 'r'
33+
| 's'
34+
| 't'
35+
| 'u'
36+
| 'v'
37+
| 'w'
38+
| 'x'
39+
| 'y'
40+
| 'z';
41+
42+
/**
43+
* An empty string ("").
44+
*/
45+
export type CMIBlank = '';
46+
47+
/**
48+
* A vocabulary of two words ("true" or "false").
49+
*/
50+
export type CMIBoolean = 'true' | 'false';
51+
52+
/**
53+
* A number that may have a decimal point. If not preceded by a minus sign, the number is presumed to be positive. Examples are "2", "2.2" and "-2.2".
54+
*/
55+
export type CMIDecimal = `${string}`;
56+
57+
/**
58+
* Feedback is one of the following single characters: "0", "1", "t" or "f".
59+
*/
60+
export type CMIFeedbackTrueFalse = '0' | '1' | 't' | 'f';
61+
62+
/**
63+
* Feedback is one or more single characters separated by a comma. Legal characters are "0" to "9" and "a" to "z". If all the characters must be chosen to assume the feedback is correct, then the
64+
* comma-separated list must be surrounded by curly brackets: {}
65+
*/
66+
export type CMIFeedbackChoice = `{${string}}` | string;
67+
68+
/**
69+
* Any alpha-numeric string up to 255 characters in length. After the first letter spaces are significant.
70+
*/
71+
export type CMIFeedbackFillIn = string;
72+
73+
/**
74+
* A number that may have a decimal point. If not preceded by a minus sign, the number is presumed to be positive. Examples are "2", "2.2" and "-2.2".
75+
*/
76+
export type CMIFeedbackNumeric = CMIDecimal;
77+
78+
/**
79+
* Single character. Legal characters are 0 to 9 and a to z.
80+
*/
81+
export type CMIFeedbackLikert = Char;
82+
83+
/**
84+
* One or more pairs of identifiers. Each identifier is a single letter or number (0 to 9 and a to z). The identifiers in a pair are separated by a period. Commas separate the pairs. If all pairs
85+
* must be matched correctly to consider the interaction correct, then the comma separated list of pairs are surrounded by curly brackets: {}
86+
*/
87+
export type CMIFeedbackMatching = `{${string}}` | string;
88+
89+
/**
90+
* This is a very flexible format. Essentially an alphanumeric string of 255 characters or less.
91+
*/
92+
export type CMIFeedbackPerformance = string;
93+
94+
/**
95+
* A series of single characters separated by commas. Legal characters are 0 to 9 and a to z. The order of the characters determines the correctness of the feedback.
96+
*/
97+
export type CMIFeedbackSequencing = string;
98+
99+
/**
100+
* A structured description of a student response in an interaction. The structure and contents of the feedback depends upon the type of interaction.
101+
*/
102+
export type CMIFeedback =
103+
| CMIFeedbackTrueFalse
104+
| CMIFeedbackChoice
105+
| CMIFeedbackFillIn
106+
| CMIFeedbackNumeric
107+
| CMIFeedbackLikert
108+
| CMIFeedbackMatching
109+
| CMIFeedbackPerformance;
110+
111+
/**
112+
* An alphanumeric group of characters with no white space or unprintable characters in it. Maximum of 255 characters.
113+
*/
114+
export type CMIIdentifier = string;
115+
116+
/**
117+
* An integer number from 0 to 65536.
118+
*/
119+
export type CMIInteger = string;
120+
121+
/**
122+
* A signed integer number from -32768 to +32768.
123+
*/
124+
export type CMISInteger = string;
125+
126+
/**
127+
* A set of ASCII characters with a maximum length of 255 characters.
128+
*/
129+
export type CMIString255 = string;
130+
131+
/**
132+
* A set of ASCII characters with a maximum length of 4096 characters.
133+
*/
134+
export type CMIString4096 = string;
135+
136+
/**
137+
* A chronological point in a 24 hour clock. Identified in hours, minutes and seconds in the format: HH:MM:SS.SS.
138+
*
139+
* Hours and minutes shall contain exactly 2 digits. Seconds shall contain 2 digits, with an optional decimal point and 1 or 2 additional digits (i.e. 34.45).
140+
*/
141+
export type CMITime = `${string}:${string}:${string}`;
142+
143+
/**
144+
* A length of time in hours, minutes and seconds shown in the following numerical format: HHHH:MM:SS.SS.
145+
*
146+
* Hours have a minimum of 2 digits and a maximum of 4 digits. Minutes shall consist of exactly 2 digits. Seconds shall contain 2 digits, with an optional decimal point and 1 or 2 additional digits
147+
* (i.e. 34.45).
148+
*/
149+
export type CMITimeSpan = `${string}:${string}:${string}`;

0 commit comments

Comments
 (0)