Merge pull request #17948 from ikatyang/add-rev-hash-definitions

feat(rev-hash): initial commit
This commit is contained in:
Ryan Cavanaugh
2017-07-14 00:06:15 -07:00
committed by GitHub
4 changed files with 45 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for rev-hash 2.0
// Project: https://github.com/sindresorhus/rev-hash
// Definitions by: Ika <https://github.com/ikatyang>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
/**
* Create a hash for file revving
* @param input Data to create a hash from.
*/
declare function revHash(input: Buffer | string): string;
export = revHash;
+6
View File
@@ -0,0 +1,6 @@
import * as fs from 'fs';
import revHash = require('rev-hash');
revHash(fs.readFileSync('unicorn.png'));
revHash('Lorem ipsum dolor sit amet');
+22
View 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",
"rev-hash-tests.ts"
]
}
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}