codereview changes

This commit is contained in:
Konrad Mattheis
2017-11-16 09:34:21 +01:00
parent d109f464a6
commit 6a0ff21074
2 changed files with 12 additions and 12 deletions
+6 -4
View File
@@ -1,8 +1,10 @@
import * as enigma from "enigma.js";
// import enigma = require("enigma.js");
enigma.create({
url: "http://127.0.0.1:4848/",
schema: {}
}).open().then((global) => {
const config: enigmaJS.IConfig = {
url: "http://127.0.0.1:4848/",
schema: {}
};
enigma.create(config).open().then((global) => {
console.log("connect fine");
});
+6 -8
View File
@@ -5,11 +5,15 @@
// TypeScript Version: 2.2
declare module "enigma.js" {
const e: IEnigmaJSClass;
const e: IEnigmaClass;
export = e;
}
interface IEnigmaJSClass {
// declare const enigmaJS: IEnigmaClass;
// export = enigmaJS;
// export as namespace enigmaJS;
interface IEnigmaClass {
/**
* Create a session object.
* @returns - Returns a session.
@@ -94,12 +98,6 @@ declare namespace enigmaJS {
}
interface ISession {
/**
* Establishes the websocket against the configured URL. Eventually resolved with the QIX global interface when the connection has been established.
* @return Promise.
*/
open(): Promise<IGeneratedAPI>;
/**
* Establishes the websocket against the configured URL. Eventually resolved with the QIX global interface when the connection has been established.
* @return Promise.