diff --git a/types/sdbm/index.d.ts b/types/sdbm/index.d.ts new file mode 100644 index 0000000000..e2edb994d0 --- /dev/null +++ b/types/sdbm/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for sdbm 1.0 +// Project: https://github.com/sindresorhus/sdbm#readme +// Definitions by: BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = sdbm; + +declare function sdbm(string: string): number; diff --git a/types/sdbm/sdbm-tests.ts b/types/sdbm/sdbm-tests.ts new file mode 100644 index 0000000000..6b586efff1 --- /dev/null +++ b/types/sdbm/sdbm-tests.ts @@ -0,0 +1,4 @@ +import sdbm = require('sdbm'); + +// $ExpectType number +sdbm('🦄🌈'); diff --git a/types/sdbm/tsconfig.json b/types/sdbm/tsconfig.json new file mode 100644 index 0000000000..cad9717aae --- /dev/null +++ b/types/sdbm/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sdbm-tests.ts" + ] +} diff --git a/types/sdbm/tslint.json b/types/sdbm/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sdbm/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }