Add failure scenario

Original properties must be kept!
This commit is contained in:
Junyoung Choi
2017-09-07 00:56:20 +09:00
parent 34b2133e83
commit ec9ef2c302

View File

@@ -24,6 +24,9 @@ file.message('`braavo` is misspelt; did you mean `bravo`?', {line: 1, column: 8}
console.log(file.messages);
// Keep typings of custom data
// Typings of the custom data can be resolved from the parameters above
const custom: string = file.custom; // 'Custom tango'
const dataCustom: number = file.data.custom; // 12345
// Original properties must be kept
const fileWithWrongParams = vfile({ path: 1234 }); // $ExpectError