Files
DefinitelyTyped/types/relaxed-json/index.d.ts
Mikal Madsen ea345679fb Add Recase typings (#15744)
* Add Recase typings

* Add relaxed-json type definitions

* Update Recase and Relaxed-JSON types as per PR review

* Update Recase and Relaxed-JSON types
2017-05-01 15:19:16 -07:00

17 lines
612 B
TypeScript

// Type definitions for relaxed-json 1.0
// Project: https://github.com/phadej/relaxed-json
// Definitions by: Mikal Madsen <https://github.com/18steps>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type Reviver = (this: {}, key: string, value: any) => any;
export function transform(text: string): string;
export function parse(text: string, reviver: Reviver): {};
export function parse(text: string, opts?: {
reviver?: Reviver,
relaxed?: boolean,
warnings?: boolean,
tolerant?: boolean,
duplicate?: boolean,
}): {};
export function stringify(obj: any): string;