Add types for @sindresorhus/djb2a

This commit is contained in:
Dimitri Benin
2018-12-09 18:48:06 +01:00
parent e95e11dcf2
commit 7f3d75757f
4 changed files with 41 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for @sindresorhus/djb2a 1.0
// Project: https://github.com/sindresorhus/djb2a
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = djb2a;
declare function djb2a(string: string): number;
@@ -0,0 +1,4 @@
import djb2a = require('@sindresorhus/djb2a');
// $ExpectType number
djb2a('🦄🌈');
+28
View File
@@ -0,0 +1,28 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"paths": {
"@sindresorhus/djb2a": [
"sindresorhus__djb2a"
]
},
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"sindresorhus__djb2a-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }