mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
Add hash-file
This commit is contained in:
7
types/hash-file/hash-file-tests.ts
Normal file
7
types/hash-file/hash-file-tests.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import hashFile = require('hash-file');
|
||||
|
||||
hashFile('tsconfig.json')
|
||||
.then((hash: string) => {
|
||||
});
|
||||
|
||||
const hash = hashFile.sync('tsconfig.json');
|
||||
12
types/hash-file/index.d.ts
vendored
Normal file
12
types/hash-file/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// Type definitions for hash-file 3.0
|
||||
// Project: https://github.com/kevva/hash-file#readme
|
||||
// Definitions by: Hiromi Shikata <https://github.com/HiromiShikata>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = hash_file;
|
||||
|
||||
declare function hash_file(src: string): Promise<string>;
|
||||
|
||||
declare namespace hash_file {
|
||||
function sync(src: string): string;
|
||||
}
|
||||
22
types/hash-file/tsconfig.json
Normal file
22
types/hash-file/tsconfig.json
Normal file
@@ -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"
|
||||
]
|
||||
}
|
||||
3
types/hash-file/tslint.json
Normal file
3
types/hash-file/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../tslint.json"
|
||||
}
|
||||
Reference in New Issue
Block a user