mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-06 17:29:08 +00:00
Add failure scenario
Original properties must be kept!
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user