Add type to is-image module.

This commit is contained in:
DenisFrezzato 2019-03-31 19:32:57 +02:00
parent 0341d2d082
commit bc1da19924
4 changed files with 28 additions and 0 deletions

8
types/is-image/index.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
// Type definitions for is-image 2.0
// Project: https://github.com/sindresorhus/is-image#readme
// Definitions by: Denis Frezzato <https://github.com/DenisFrezzato>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = isImage;
declare function isImage(filepath: string): boolean;

View File

@ -0,0 +1,3 @@
import isImage = require('is-image');
const res: boolean = isImage('/path/to/img.png');

View File

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

View File

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