From efb55e1b634b642a981f092cc3cfe285c53aa2af Mon Sep 17 00:00:00 2001 From: Soner Koksal Date: Mon, 13 Nov 2017 22:06:30 +0300 Subject: [PATCH] add definitions for holderjs --- types/holderjs/holderjs-tests.ts | 7 +++++++ types/holderjs/index.d.ts | 10 ++++++++++ types/holderjs/tsconfig.json | 24 ++++++++++++++++++++++++ types/holderjs/tslint.json | 1 + 4 files changed, 42 insertions(+) create mode 100644 types/holderjs/holderjs-tests.ts create mode 100644 types/holderjs/index.d.ts create mode 100644 types/holderjs/tsconfig.json create mode 100644 types/holderjs/tslint.json diff --git a/types/holderjs/holderjs-tests.ts b/types/holderjs/holderjs-tests.ts new file mode 100644 index 0000000000..5a33d74aac --- /dev/null +++ b/types/holderjs/holderjs-tests.ts @@ -0,0 +1,7 @@ +import * as Holder from "holderjs"; + +const myImage = document.getElementById('myImage'); + +Holder.run({ + images: myImage +}); diff --git a/types/holderjs/index.d.ts b/types/holderjs/index.d.ts new file mode 100644 index 0000000000..a77d5cda60 --- /dev/null +++ b/types/holderjs/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for holderjs 2.9 +// Project: http://holderjs.com +// Definitions by: Soner Köksal +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Options { + images: HTMLElement | null; +} + +export function run(options: Options): void; diff --git a/types/holderjs/tsconfig.json b/types/holderjs/tsconfig.json new file mode 100644 index 0000000000..6cf9415ee2 --- /dev/null +++ b/types/holderjs/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "holderjs-tests.ts" + ] +} diff --git a/types/holderjs/tslint.json b/types/holderjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/holderjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }