[@sindresorhus/string-hash] Add types

This commit is contained in:
Dimitri Benin
2019-01-12 19:42:12 +01:00
parent 3a69de74e2
commit 61bc8d44c4
4 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
// Type definitions for @sindresorhus/string-hash 1.0
// Project: https://github.com/sindresorhus/string-hash
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = stringHash;
declare function stringHash(input: string): number;

View File

@@ -0,0 +1,3 @@
import stringHash = require('@sindresorhus/string-hash');
stringHash('🦄🌈'); // $ExpectType number

View File

@@ -0,0 +1,28 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"paths": {
"@sindresorhus/string-hash": [
"sindresorhus__string-hash"
]
},
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"sindresorhus__string-hash-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }