mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
feat(is-gif): new definition (#47153)
Small util used by imagemin: - definition file - tests https://github.com/sindresorhus/is-gif Thanks!
This commit is contained in:
parent
265655443a
commit
87f0d7d53b
12
types/is-gif/index.d.ts
vendored
Normal file
12
types/is-gif/index.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// Type definitions for is-gif 3.0
|
||||
// Project: https://github.com/sindresorhus/is-gif#readme
|
||||
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/// <reference types="node" />
|
||||
|
||||
/**
|
||||
* Returns a boolean of whether input is a GIF image.
|
||||
*/
|
||||
declare function isGif(input: Buffer | Uint8Array): boolean;
|
||||
|
||||
export = isGif;
|
||||
4
types/is-gif/is-gif-tests.ts
Normal file
4
types/is-gif/is-gif-tests.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import isGif = require('is-gif');
|
||||
|
||||
isGif(Buffer.from('x')); // $ExpectType boolean
|
||||
isGif(new Uint8Array(Buffer.from('x'))); // $ExpectType boolean
|
||||
23
types/is-gif/tsconfig.json
Normal file
23
types/is-gif/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"is-gif-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/is-gif/tslint.json
Normal file
1
types/is-gif/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user