mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Add types for image-type (#29740)
This commit is contained in:
committed by
Sheetal Nandi
parent
1969b1a47c
commit
e773ece94a
@@ -0,0 +1,4 @@
|
||||
import imageType = require('file-type');
|
||||
|
||||
imageType(new Buffer([0xFF, 0xD8, 0xFF]));
|
||||
imageType(new Uint8Array([0xFF, 0xD8, 0xFF]));
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for image-type 3.0
|
||||
// Project: https://github.com/sindresorhus/image-type#readme
|
||||
// Definitions by: Florian Keller <https://github.com/ffflorian>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
import FileType = require('file-type');
|
||||
|
||||
declare function ImageType(buf: Buffer | Uint8Array): FileType.FileTypeResult | null;
|
||||
|
||||
export = ImageType;
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"image-type-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user