2019-02-03 13:32:46 +02:00
|
|
|
type Obj = { [key: string]: any };
|
|
|
|
|
2019-02-01 14:08:49 +02:00
|
|
|
declare module 'nested-property' {
|
|
|
|
interface IHasNestedPropertyOptions {
|
|
|
|
own?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IIsInNestedPropertyOptions {
|
|
|
|
validPath?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function set<T>(object: T, property: string, value: any): T;
|
|
|
|
|
2019-02-03 13:32:46 +02:00
|
|
|
export function get(object: Obj, property: string): any;
|
2019-02-01 14:08:49 +02:00
|
|
|
|
2019-02-03 13:32:46 +02:00
|
|
|
export function has(object: Obj, property: string, options?: IHasNestedPropertyOptions): boolean;
|
2019-02-01 14:08:49 +02:00
|
|
|
|
2019-02-03 13:32:46 +02:00
|
|
|
export function hasOwn(object: Obj, property: string, options?: IHasNestedPropertyOptions): boolean;
|
2019-02-01 14:08:49 +02:00
|
|
|
|
2019-02-03 13:32:46 +02:00
|
|
|
export function isIn(object: Obj, property: string, objectInPath: Obj, options?: IIsInNestedPropertyOptions): boolean;
|
2019-02-01 14:08:49 +02:00
|
|
|
}
|