mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
* add test-enigma.js.ts
* fix small types Signed-off-by: Konrad Mattheis <konrad.mattheis@akquinet.de>
This commit is contained in:
Vendored
+9
-6
@@ -4,12 +4,15 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
declare module "enigma.js" {
|
||||
const e: IEnigmaJSClass;
|
||||
export = e;
|
||||
}
|
||||
// declare module "enigma.js" {
|
||||
// const e: IEnigmaJSClass;
|
||||
// export = e;
|
||||
// }
|
||||
declare const enigmaJS: IEnigmaClass;
|
||||
export = enigmaJS;
|
||||
export as namespace enigmaJS;
|
||||
|
||||
interface IEnigmaJSClass {
|
||||
interface IEnigmaClass {
|
||||
/**
|
||||
* Create a session object.
|
||||
* @returns - Returns a session.
|
||||
@@ -27,7 +30,7 @@ declare namespace enigmaJS {
|
||||
* types such as barchart, story and myCustomType.
|
||||
* An API will get both their generic type as well as custom type mixins applied.
|
||||
*/
|
||||
types: [MixinType];
|
||||
types: MixinType[];
|
||||
|
||||
init(args: {config: any, api: IGeneratedAPI}): void;
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as enigma from "enigma.js";
|
||||
|
||||
enigma.create({
|
||||
url: "http://127.0.0.1:4848/",
|
||||
schema: {}
|
||||
}).open().then((global) => {
|
||||
console.log("connect fine");
|
||||
});
|
||||
@@ -18,6 +18,7 @@
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts"
|
||||
"index.d.ts",
|
||||
"test-enigma.js.ts"
|
||||
]
|
||||
}
|
||||
@@ -2,9 +2,10 @@
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
// TODOs
|
||||
"interface-name": false,
|
||||
"ban-types": false,
|
||||
"no-empty-interface": false,
|
||||
"no-mergeable-namespace": false,
|
||||
"no-unnecessary-generics": false,
|
||||
"no-single-declare-module": false,
|
||||
"no-declare-current-package": false
|
||||
"interface-name": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user