mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Add string-hash (#12499)
Refactor string-hash definition Refactor string-hash to use commonjs
This commit is contained in:
parent
d2150a603f
commit
f498c98b3b
8
string-hash/index.d.ts
vendored
Normal file
8
string-hash/index.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// Type definitions for string-hash 1.1.1
|
||||
// Project: https://github.com/darkskyapp/string-hash
|
||||
// Definitions by: Ethan Rubio <https://github.com/ethanrubio/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare function stringHash(str: string): number;
|
||||
|
||||
export = stringHash;
|
||||
3
string-hash/string-hash-tests.ts
Normal file
3
string-hash/string-hash-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import hash = require("string-hash");
|
||||
|
||||
const newHash: number = hash("Mary had a little lamb."); // 1766333550
|
||||
19
string-hash/tsconfig.json
Normal file
19
string-hash/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"string-hash-tests.ts"
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user