mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-01 10:54:34 +08:00
* Add Recase typings * Add relaxed-json type definitions * Update Recase and Relaxed-JSON types as per PR review * Update Recase and Relaxed-JSON types
17 lines
612 B
TypeScript
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;
|