Add types for random-obj-prop

This commit is contained in:
Dimitri Benin
2018-12-03 01:22:11 +01:00
parent efbcbdebaf
commit f47939d42d
4 changed files with 36 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for random-obj-prop 1.0
// Project: https://github.com/sindresorhus/random-obj-prop
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = randomObjProp;
declare function randomObjProp<T>(input: { [key: string]: T }): T;
@@ -0,0 +1,4 @@
import randomObjProp = require('random-obj-prop');
// $ExpectType string | number
randomObjProp({ foo: 'pony', bar: 1 });
+23
View File
@@ -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",
"random-obj-prop-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }