yamljs tests file

This commit is contained in:
Tim Jonischkat
2015-03-30 16:02:48 +02:00
parent 275c43c7a6
commit ffd22a1f3e
2 changed files with 16 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
/// <reference path="yamljs.d.ts" />
yamljs.load('yaml-testfile.yml');
yamljs.parse('this_is_no_ymlstring');
yamljs.stringify({ a : 'val', b : { ba : 123, bb : 'nothing' }});
yamljs.stringify({ a : 'val', b : { ba : 123, bb : 'nothing' }}, 1);
yamljs.stringify({ a : 'val', b : { ba : 123, bb : 'nothing' }}, 1, 2);
+5 -1
View File
@@ -5,6 +5,10 @@
declare module yamljs {
export function load(path : string) : any[];
export function load(path : string) : any;
export function stringify(nativeObject : any, inline? : number, spaces? : number) : string;
export function parse(yamlString : string) : any;
}