scorm-wrapper
Version:
A TypeScript-based wrapper for handling SCORM (Sharable Content Object Reference Model) interactions in e-learning applications.
50 lines (47 loc) • 1.44 kB
text/typescript
declare namespace SCORM {
interface API {
isFound: boolean;
handle: any;
}
interface Connection {
isActive: boolean;
}
interface Debug {
isActive: boolean;
}
interface Data {
completionStatus: string | null;
exitStatus: string | null;
}
interface Scorm {
version: string | null;
handleCompletionStatus: boolean;
handleExitMode: boolean;
API: API;
connection: Connection;
data: Data;
debug: Debug;
}
const SCORM: Scorm;
var debug: Debug;
function isAvailable(): boolean;
function APIFind(win: any): API;
function APIGet(): API;
function APIGetHandle(): any;
function connectionInitialize(): boolean;
function connectionTerminate(): boolean;
function dataGet(parameter: string): string;
function dataSet(parameter: string, value: string): boolean;
function dataSave(): boolean;
function status(action: string, status?: string): string;
function debugGetCode(): number;
function debugGetInfo(errorCode: number): string;
function debugGetDiagnosticInfo(errorCode: number): string;
const init: typeof connectionInitialize;
const get: typeof dataGet;
const set: typeof dataSet;
const save: typeof dataSave;
const quit: typeof connectionTerminate;
}
declare var debug: SCORM.Debug;
export { debug, SCORM as default };