adds typings for the 'buffer-xor' package

This commit is contained in:
Daniel Byrne
2018-08-28 20:08:48 -07:00
parent 3be76f6b28
commit 6d8196db51
4 changed files with 36 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
import xor = require('buffer-xor');
// $ExpectType Buffer
xor(Buffer.from('a'), Buffer.from('b'));
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for buffer-xor 2.0
// Project: https://github.com/crypto-browserify/buffer-xor
// Definitions by: Daniel Byrne <https://github.com/danwbyrne>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types = "node" />
declare function xor(a: Buffer, b: Buffer): Buffer;
export = xor;
+19
View File
@@ -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"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}