mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-03-02 04:32:55 +00:00
Add types for random-obj-key
This commit is contained in:
parent
efbcbdebaf
commit
a7f31adfd5
9
types/random-obj-key/index.d.ts
vendored
Normal file
9
types/random-obj-key/index.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
// Type definitions for random-obj-key 1.0
|
||||
// Project: https://github.com/sindresorhus/random-obj-key
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
export = randomObjKey;
|
||||
|
||||
declare function randomObjKey<TObj extends { [key: string]: any }>(input: TObj): keyof TObj;
|
||||
4
types/random-obj-key/random-obj-key-tests.ts
Normal file
4
types/random-obj-key/random-obj-key-tests.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import randomObjKey = require('random-obj-key');
|
||||
|
||||
// $ExpectType "foo" | "bar"
|
||||
randomObjKey({ foo: true, bar: true });
|
||||
23
types/random-obj-key/tsconfig.json
Normal file
23
types/random-obj-key/tsconfig.json
Normal 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-key-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/random-obj-key/tslint.json
Normal file
1
types/random-obj-key/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user