mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* added types for camelcase-keys-deep * Refactored test file and removed namespace declaration from index.d.ts
16 lines
333 B
TypeScript
16 lines
333 B
TypeScript
import camelcaseKeysDeep = require('camelcase-keys-deep');
|
|
|
|
interface Point {
|
|
point_x: number;
|
|
point_y: number;
|
|
}
|
|
|
|
const foo: Point = {
|
|
point_x: 1,
|
|
point_y: 2,
|
|
};
|
|
|
|
camelcaseKeysDeep(foo) as Point; // => {pointX: 1, pointY: 2}
|
|
|
|
camelcaseKeysDeep({ unicorn_rainbow: { foo_bar: 1 } }); // => unicornRainbow: {fooBar: 1}
|