diff --git a/types/is-obj/index.d.ts b/types/is-obj/index.d.ts new file mode 100644 index 0000000000..4df97e0660 --- /dev/null +++ b/types/is-obj/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for is-obj 1.0 +// Project: https://github.com/sindresorhus/is-obj#readme +// Definitions by: Emily Marigold Klassen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = isObj; + +declare function isObj(x: any): x is object; diff --git a/types/is-obj/is-obj-tests.ts b/types/is-obj/is-obj-tests.ts new file mode 100644 index 0000000000..1fdf19cbf9 --- /dev/null +++ b/types/is-obj/is-obj-tests.ts @@ -0,0 +1,10 @@ +import isObj = require('is-obj'); + +isObj({foo: 'bar'}); +// => true + +isObj([1, 2, 3]); +// => true + +isObj('foo'); +// => false diff --git a/types/is-obj/tsconfig.json b/types/is-obj/tsconfig.json new file mode 100644 index 0000000000..0a22d83578 --- /dev/null +++ b/types/is-obj/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", + "is-obj-tests.ts" + ] +} diff --git a/types/is-obj/tslint.json b/types/is-obj/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-obj/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/is-regexp/index.d.ts b/types/is-regexp/index.d.ts new file mode 100644 index 0000000000..a89562cf16 --- /dev/null +++ b/types/is-regexp/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for is-regexp 2.0 +// Project: https://github.com/sindresorhus/is-regexp#readme +// Definitions by: Emily Marigold Klassen +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export = isRegexp; + +declare function isRegexp(input: any): input is RegExp; diff --git a/types/is-regexp/is-regexp-tests.ts b/types/is-regexp/is-regexp-tests.ts new file mode 100644 index 0000000000..c5da5665dd --- /dev/null +++ b/types/is-regexp/is-regexp-tests.ts @@ -0,0 +1,10 @@ +import isRegexp = require('is-regexp'); + +isRegexp('unicorn'); +// => false + +isRegexp(/unicorn/); +// => true + +isRegexp(new RegExp('unicorn')); +// => true diff --git a/types/is-regexp/tsconfig.json b/types/is-regexp/tsconfig.json new file mode 100644 index 0000000000..1ae59c1f8a --- /dev/null +++ b/types/is-regexp/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", + "is-regexp-tests.ts" + ] +} diff --git a/types/is-regexp/tslint.json b/types/is-regexp/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/is-regexp/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }