diff --git a/types/is-gif/index.d.ts b/types/is-gif/index.d.ts new file mode 100644 index 0000000000..7756c03c18 --- /dev/null +++ b/types/is-gif/index.d.ts @@ -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 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + +/** + * Returns a boolean of whether input is a GIF image. + */ +declare function isGif(input: Buffer | Uint8Array): boolean; + +export = isGif; diff --git a/types/is-gif/is-gif-tests.ts b/types/is-gif/is-gif-tests.ts new file mode 100644 index 0000000000..6a57b16aff --- /dev/null +++ b/types/is-gif/is-gif-tests.ts @@ -0,0 +1,4 @@ +import isGif = require('is-gif'); + +isGif(Buffer.from('x')); // $ExpectType boolean +isGif(new Uint8Array(Buffer.from('x'))); // $ExpectType boolean diff --git a/types/is-gif/tsconfig.json b/types/is-gif/tsconfig.json new file mode 100644 index 0000000000..40b23fe2c7 --- /dev/null +++ b/types/is-gif/tsconfig.json @@ -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" + ] +} diff --git a/types/is-gif/tslint.json b/types/is-gif/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-gif/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }