diff --git a/yamljs/yamljs-tests.ts b/yamljs/yamljs-tests.ts index 9780c504d4..d4e6376d68 100644 --- a/yamljs/yamljs-tests.ts +++ b/yamljs/yamljs-tests.ts @@ -1,13 +1,7 @@ /// -import yamljs = require('yamljs'); +var yamlObj = YAML.parse("test: some yaml"); -yamljs.load('yaml-testfile.yml'); +YAML.stringify(yamlObj); -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); \ No newline at end of file +YAML.load("path/to/file.yaml"); \ No newline at end of file diff --git a/yamljs/yamljs.d.ts b/yamljs/yamljs.d.ts index 65d2fd9239..96c9d33c77 100644 --- a/yamljs/yamljs.d.ts +++ b/yamljs/yamljs.d.ts @@ -1,9 +1,9 @@ -// Type definitions for yamljs 0.2.1 +// Type definitions for yamljs 0.2.3 // Project: https://github.com/jeremyfa/yaml.js // Definitions by: Tim Jonischkat // Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module "yamljs" { +declare module YAML { export function load(path : string) : any;