diff --git a/types/buffer-xor/buffer-xor-tests.ts b/types/buffer-xor/buffer-xor-tests.ts new file mode 100644 index 0000000000..7c55514eaa --- /dev/null +++ b/types/buffer-xor/buffer-xor-tests.ts @@ -0,0 +1,4 @@ +import xor = require('buffer-xor'); + +// $ExpectType Buffer +xor(Buffer.from('a'), Buffer.from('b')); diff --git a/types/buffer-xor/index.d.ts b/types/buffer-xor/index.d.ts new file mode 100644 index 0000000000..5e98793266 --- /dev/null +++ b/types/buffer-xor/index.d.ts @@ -0,0 +1,10 @@ +// Type definitions for buffer-xor 2.0 +// Project: https://github.com/crypto-browserify/buffer-xor +// Definitions by: Daniel Byrne +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare function xor(a: Buffer, b: Buffer): Buffer; + +export = xor; diff --git a/types/buffer-xor/tsconfig.json b/types/buffer-xor/tsconfig.json new file mode 100644 index 0000000000..adbeaec3b7 --- /dev/null +++ b/types/buffer-xor/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "buffer-xor-tests.ts" + ] +} diff --git a/types/buffer-xor/tslint.json b/types/buffer-xor/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/buffer-xor/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}