diff --git a/types/hash-file/hash-file-tests.ts b/types/hash-file/hash-file-tests.ts new file mode 100644 index 0000000000..f269dbb64b --- /dev/null +++ b/types/hash-file/hash-file-tests.ts @@ -0,0 +1,7 @@ +import hashFile = require('hash-file'); + +hashFile('tsconfig.json') + .then((hash: string) => { + }); + +const hash = hashFile.sync('tsconfig.json'); diff --git a/types/hash-file/index.d.ts b/types/hash-file/index.d.ts new file mode 100644 index 0000000000..988b65771b --- /dev/null +++ b/types/hash-file/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for hash-file 3.0 +// Project: https://github.com/kevva/hash-file#readme +// Definitions by: Hiromi Shikata +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = hash_file; + +declare function hash_file(src: string): Promise; + +declare namespace hash_file { + function sync(src: string): string; +} diff --git a/types/hash-file/tsconfig.json b/types/hash-file/tsconfig.json new file mode 100644 index 0000000000..2f3b07265c --- /dev/null +++ b/types/hash-file/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hash-file-tests.ts" + ] +} diff --git a/types/hash-file/tslint.json b/types/hash-file/tslint.json new file mode 100644 index 0000000000..f9e30021f4 --- /dev/null +++ b/types/hash-file/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "../tslint.json" +}