mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-03-02 04:32:55 +00:00
Add type to is-image module.
This commit is contained in:
parent
0341d2d082
commit
bc1da19924
8
types/is-image/index.d.ts
vendored
Normal file
8
types/is-image/index.d.ts
vendored
Normal 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;
|
||||
3
types/is-image/is-image-tests.ts
Normal file
3
types/is-image/is-image-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import isImage = require('is-image');
|
||||
|
||||
const res: boolean = isImage('/path/to/img.png');
|
||||
16
types/is-image/tsconfig.json
Normal file
16
types/is-image/tsconfig.json
Normal 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"]
|
||||
}
|
||||
1
types/is-image/tslint.json
Normal file
1
types/is-image/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user