-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for passing options to yaml parser
Closes GH-2. Reviewed-by: Titus Wormer <tituswormer@gmail.com> Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
- Loading branch information
1 parent
4c97d06
commit 107d6d8
Showing
5 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
import vfile = require('vfile') | ||
import matter = require('vfile-matter') | ||
import {CORE_SCHEMA} from 'js-yaml' | ||
|
||
const file = vfile() | ||
|
||
matter(file) // $ExpectType VFile | ||
matter(file, {strip: true}) // $ExpectType VFile | ||
matter(file, {yaml: {schema: CORE_SCHEMA}}) // $ExpectType VFile | ||
matter(file, {}) // $ExpectType VFile | ||
matter(1) // $ExpectError | ||
matter(file, {strip: 'string'}) // $ExpectError | ||
matter(file, {yaml: 'string'}) // $ExpectError |