diff --git a/types/is-image/index.d.ts b/types/is-image/index.d.ts new file mode 100644 index 0000000000..f390206830 --- /dev/null +++ b/types/is-image/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for is-image 2.0 +// Project: https://github.com/sindresorhus/is-image#readme +// Definitions by: Denis Frezzato +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = isImage; + +declare function isImage(filepath: string): boolean; diff --git a/types/is-image/is-image-tests.ts b/types/is-image/is-image-tests.ts new file mode 100644 index 0000000000..2cbdb0bf0c --- /dev/null +++ b/types/is-image/is-image-tests.ts @@ -0,0 +1,3 @@ +import isImage = require('is-image'); + +const res: boolean = isImage('/path/to/img.png'); diff --git a/types/is-image/tsconfig.json b/types/is-image/tsconfig.json new file mode 100644 index 0000000000..2d1799652d --- /dev/null +++ b/types/is-image/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "is-image-tests.ts"] +} diff --git a/types/is-image/tslint.json b/types/is-image/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-image/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }