Update definitions and tests

This commit is contained in:
Jason Saelhof
2015-07-31 14:46:55 -06:00
parent 4df20c9706
commit 2ee0d57fae
2 changed files with 5 additions and 11 deletions

View File

@@ -1,13 +1,7 @@
/// <reference path="yamljs.d.ts" />
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);
YAML.load("path/to/file.yaml");

4
yamljs/yamljs.d.ts vendored
View File

@@ -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 <http://www.tim-jonischkat.de>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "yamljs" {
declare module YAML {
export function load(path : string) : any;