diff --git a/string-hash/index.d.ts b/string-hash/index.d.ts new file mode 100644 index 0000000000..5b8986e05b --- /dev/null +++ b/string-hash/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for string-hash 1.1.1 +// Project: https://github.com/darkskyapp/string-hash +// Definitions by: Ethan Rubio +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare function stringHash(str: string): number; + +export = stringHash; diff --git a/string-hash/string-hash-tests.ts b/string-hash/string-hash-tests.ts new file mode 100644 index 0000000000..3723fd87bb --- /dev/null +++ b/string-hash/string-hash-tests.ts @@ -0,0 +1,3 @@ +import hash = require("string-hash"); + +const newHash: number = hash("Mary had a little lamb."); // 1766333550 diff --git a/string-hash/tsconfig.json b/string-hash/tsconfig.json new file mode 100644 index 0000000000..e93748c357 --- /dev/null +++ b/string-hash/tsconfig.json @@ -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" + ] +} \ No newline at end of file