mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
Add types for snakecase-keys
This commit is contained in:
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// Type definitions for snakecase-keys 2.1
|
||||
// Project: https://github.com/bendrucker/snakecase-keys#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
export = snakecaseKeys;
|
||||
|
||||
declare function snakecaseKeys(
|
||||
obj: object,
|
||||
options?: snakecaseKeys.Options
|
||||
): { [key: string]: any };
|
||||
|
||||
declare namespace snakecaseKeys {
|
||||
interface Options {
|
||||
deep?: boolean;
|
||||
exclude?: Array<string | RegExp>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import snakecaseKeys = require('snakecase-keys');
|
||||
|
||||
snakecaseKeys({ fooBar: 'baz' });
|
||||
snakecaseKeys({ fooBar: 'baz' }, { deep: false });
|
||||
snakecaseKeys({ fooBar: 'baz' }, { exclude: ['fooBax', /Foo$/] });
|
||||
@@ -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",
|
||||
"snakecase-keys-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user