From 0ffa9c0f32fba32f61a2516dd2438fad537ba577 Mon Sep 17 00:00:00 2001 From: Shantanu Bhadoria Date: Fri, 14 Oct 2016 12:41:30 +0800 Subject: [PATCH] refactored as per best practices --- ejson/ejson.d.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ejson/ejson.d.ts b/ejson/ejson.d.ts index 51e54b7503..029222239c 100644 --- a/ejson/ejson.d.ts +++ b/ejson/ejson.d.ts @@ -3,22 +3,24 @@ // Definitions by: Shantanu Bhadoria // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare interface IStringifyOptions { - canonical: boolean; - indent: boolean|number|string; -} -declare interface ICloneOptions { - keyOrderSensitive: boolean; -} declare module "ejson" { + interface StringifyOptions { + canonical: boolean; + indent: boolean|number|string; + } + + interface CloneOptions { + keyOrderSensitive: boolean; + } + function clone(obj: T): T; function parse(str: string): any; - function stringify(obj: any, options?: IStringifyOptions): string; + function stringify(obj: any, options?: StringifyOptions): string; function toJSONValue(obj: any): string; function fromJSONValue(obj: string): any; function isBinary(value: any): boolean; function newBinary(len: number): Uint8Array; - function equals(a: any, b: any, options?: ICloneOptions): boolean; + function equals(a: any, b: any, options?: CloneOptions): boolean; }