diff --git a/types/obj-str/index.d.ts b/types/obj-str/index.d.ts new file mode 100644 index 0000000000..44672fbd0a --- /dev/null +++ b/types/obj-str/index.d.ts @@ -0,0 +1,8 @@ +// Type definitions for obj-str 1.0 +// Project: https://github.com/lukeed/obj-str#readme +// Definitions by: Sascha Englert +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = objstr; + +declare function objstr(obj: { [name: string]: boolean }): string; diff --git a/types/obj-str/obj-str-tests.ts b/types/obj-str/obj-str-tests.ts new file mode 100644 index 0000000000..e945aef673 --- /dev/null +++ b/types/obj-str/obj-str-tests.ts @@ -0,0 +1,6 @@ +import objstr = require('obj-str'); + +const isTrue = () => true; + +objstr({ foo: true, bar: false, baz: isTrue() }); +// => 'foo baz' diff --git a/types/obj-str/tsconfig.json b/types/obj-str/tsconfig.json new file mode 100644 index 0000000000..e2498d5707 --- /dev/null +++ b/types/obj-str/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": ["../"], + "strictFunctionTypes": true, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": ["index.d.ts", "obj-str-tests.ts"] +} diff --git a/types/obj-str/tslint.json b/types/obj-str/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/obj-str/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }