mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
|
…
|
||
|---|---|---|
| .. | ||
| enigma.js-tests.ts | ||
| index.d.ts | ||
| README.md | ||
| tsconfig.json | ||
| tslint.json | ||
Installation
npm install --save @types/enigma.js
Summary
This package contains type definitions for enigma.js (https://github.com/qlik-oss/enigma.js).
Example
npm install --save enigma.js
npm install --save bluebird
import * as enigma from "enigma.js";
import * as blubird from "bluebird";
let qixSchema = require("./node_modules/enigma.js/schemas/12.20.0.json");
let enigmaConfig: enigmaJS.IConfig = {
Promise: blubird,
schema: qixSchema,
url: "ws://localhost:4848/"
};
let session = enigma.create(enigmaConfig);
session.on("traffic:sent", data => console.log("sent:", data));
session.open()
.then((global: EngineAPI.IGlobal) => {
return global.EngineVersion();
})
.then((version) => {
console.log(version);
});