add definitions for holderjs

This commit is contained in:
Soner Koksal
2017-11-13 22:06:30 +03:00
parent 69d24cb749
commit efb55e1b63
4 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import * as Holder from "holderjs";
const myImage = document.getElementById('myImage');
Holder.run({
images: myImage
});

10
types/holderjs/index.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
// Type definitions for holderjs 2.9
// Project: http://holderjs.com
// Definitions by: Soner Köksal <https://github.com/renjfk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface Options {
images: HTMLElement | null;
}
export function run(options: Options): void;

View File

@@ -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"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }