mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [pathval] Add types for pathval * Clean up redundant interfaces, use UMD mod. syntax Changes requested by @sandersn - Don't override lint rules in tslint.json - Use modern UMD module syntax - Removed redundant namespaces
22 lines
737 B
TypeScript
22 lines
737 B
TypeScript
// Type definitions for pathval 1.1
|
|
// Project: https://www.npmjs.com/package/pathval
|
|
// Definitions by: Rebecca Turner <https://github.com/9999years>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.2
|
|
|
|
export interface PathInfo {
|
|
parent: object;
|
|
name: string;
|
|
value?: any;
|
|
exists: boolean;
|
|
}
|
|
|
|
export type Property = string | symbol | number;
|
|
|
|
export function hasProperty(obj: object | undefined | null, name: Property): boolean;
|
|
export function getPathInfo(obj: object, path: string): PathInfo;
|
|
export function getPathValue(obj: object, path: string): object | undefined;
|
|
export function setPathValue(obj: object, path: string, val: any): object;
|
|
|
|
export as namespace pathval;
|