mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Add [@strikeentco/get] type declarations (#38039)
* [@strikeentco/get] Added types for strikeentco's get * [@strikeentco/get] Fixed common mistake array -> ReadonlyArray
This commit is contained in:
committed by
Andrew Casey
parent
71ce6eca63
commit
444fa06fdf
9
types/strikeentco__get/index.d.ts
vendored
Normal file
9
types/strikeentco__get/index.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Type definitions for @strikeentco/get 1.0
|
||||
// Project: https://github.com/strikeentco/get
|
||||
// Definitions by: Elliott Campbell <https://github.com/ElliottCampbellJHA>
|
||||
// Erik Heikes <https://github.com/eheikes>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
declare function get(obj: object, paths: string | ReadonlyArray<string>, separator?: string): any;
|
||||
export = get;
|
||||
7
types/strikeentco__get/strikeentco__get-tests.ts
Normal file
7
types/strikeentco__get/strikeentco__get-tests.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import get = require('@strikeentco/get');
|
||||
|
||||
get({ a: { b: 'c' } }, 'a.b');
|
||||
get({ a: { b: ['c', 'd'] } }, 'a.b.1');
|
||||
get({ a: { b: ['c', 'd'] } }, ['a', 'b']);
|
||||
get({ a: { b: 'c' } }, 'a.b.c.d');
|
||||
get({ a: { b: 'c' } }, 'a:b', ':');
|
||||
26
types/strikeentco__get/tsconfig.json
Normal file
26
types/strikeentco__get/tsconfig.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {
|
||||
"@strikeentco/get": ["strikeentco__get"]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"strikeentco__get-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/strikeentco__get/tslint.json
Normal file
1
types/strikeentco__get/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user