mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #17948 from ikatyang/add-rev-hash-definitions
feat(rev-hash): initial commit
This commit is contained in:
Vendored
+14
@@ -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;
|
||||
@@ -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');
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user