cson parser returns any rather than Object

This commit is contained in:
Piotr Roszatycki
2017-11-09 15:17:34 +01:00
parent c6835d5e17
commit 9c499ae5e9
2 changed files with 19 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ console.log('cson.createJSONString => %s', data);
data = cson.createCSONString({hello: 'world'});
console.log('cson.createCSONString => %s', data);
var obj: Object = cson.parse(data);
var obj = cson.parse(data);
console.log('cson.parse => %s', JSON.stringify(obj));
obj = cson.parseCSONString(data);

36
types/cson/index.d.ts vendored
View File

@@ -5,27 +5,27 @@
// Create Strings
export declare function stringify(data: Object, opts?: Object, indent?: any): string;
export declare function createCSONString(data: Object, opts?: Object, next?: any): string;
export declare function createJSONString(data: Object, opts?: Object, next?: any): string;
export declare function createString(data: Object, opts?: Object, next?: any): string;
export declare function stringify(data: any, opts?: Object, indent?: any): string;
export declare function createCSONString(data: any, opts?: Object, next?: any): string;
export declare function createJSONString(data: any, opts?: Object, next?: any): string;
export declare function createString(data: any, opts?: Object, next?: any): string;
// Parse Strings
export declare function parse(data: string, opts?: Object, next?: any): Object;
export declare function parseCSONString(data: string, opts?: Object, next?: any): Object;
export declare function parseJSONString(data: string, opts?: Object, next?: any): Object;
export declare function parseCSString(data: string, opts?: Object, next?: any): Object;
export declare function parseJSString(data: string, opts?: Object, next?: any): Object;
export declare function parseString(data: string, opts?: Object, next?: any): Object;
export declare function parse(data: string, opts?: Object, next?: any): any;
export declare function parseCSONString(data: string, opts?: Object, next?: any): any;
export declare function parseJSONString(data: string, opts?: Object, next?: any): any;
export declare function parseCSString(data: string, opts?: Object, next?: any): any;
export declare function parseJSString(data: string, opts?: Object, next?: any): any;
export declare function parseString(data: string, opts?: Object, next?: any): any;
// Parse Files
export declare function load(filePath: string, opts?: Object, next?: any): Object;
export declare function parseCSONFile(filePath: string, opts?: Object, next?: any): Object;
export declare function parseJSONFile(filePath: string, opts?: Object, next?: any): Object;
export declare function parseCSFile(filePath: string, opts?: Object, next?: any): Object;
export declare function parseJSFile(filePath: string, opts?: Object, next?: any): Object;
export declare function load(filePath: string, opts?: Object, next?: any): any;
export declare function parseCSONFile(filePath: string, opts?: Object, next?: any): any;
export declare function parseJSONFile(filePath: string, opts?: Object, next?: any): any;
export declare function parseCSFile(filePath: string, opts?: Object, next?: any): any;
export declare function parseJSFile(filePath: string, opts?: Object, next?: any): any;
// Require Files
export declare function requireCSFile(filePath: string, opts?: Object, next?: any): Object;
export declare function requireJSFile(filePath: string, opts?: Object, next?: any): Object;
export declare function requireFile(filePath: string, opts?: Object, next?: any): Object;
export declare function requireCSFile(filePath: string, opts?: Object, next?: any): any;
export declare function requireJSFile(filePath: string, opts?: Object, next?: any): any;
export declare function requireFile(filePath: string, opts?: Object, next?: any): any;