mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added constructorAction, which was missing from the previous type definition Make protoAction optional, per URL below. See https://github.com/fastify/secure-json-parse#readme Co-authored-by: Mike MacCana <mike@daisie.com>
17 lines
714 B
TypeScript
17 lines
714 B
TypeScript
// Type definitions for secure-json-parse 1.0
|
|
// Project: https://github.com/fastify/secure-json-parse#readme
|
|
// Definitions by: Sjoerd Diepen <https://github.com/OSjoerdWie>
|
|
// Mike MacCana <https://github.com/mikemaccana>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export type Reviver = (this: any, key: string, value: any) => any;
|
|
|
|
export interface ParseOptions {
|
|
protoAction?: "error" | "remove" | "ignore";
|
|
constructorAction?: "error" | "remove";
|
|
}
|
|
|
|
export function parse(input: string, reviver?: Reviver, options?: ParseOptions): any;
|
|
export function safeParse(input: string, reviver?: Reviver): any;
|
|
export function scan(input: any, options?: ParseOptions): void;
|