File tree Expand file tree Collapse file tree 4 files changed +6
-22
lines changed Expand file tree Collapse file tree 4 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 17
17
"bugs" : " https://github.com/syntax-tree/unist-util-is/issues" ,
18
18
"author" : " Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)" ,
19
19
"contributors" : [
20
- " Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
20
+ " Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)" ,
21
+ " Christian Murphy <christian.murphy.42@gmail.com>"
21
22
],
22
23
"files" : [
23
24
" index.js" ,
28
29
"types" : " index.d.ts" ,
29
30
"dependencies" : {},
30
31
"devDependencies" : {
32
+ "@types/mdast" : " ^3.0.3" ,
31
33
"browserify" : " ^16.0.0" ,
32
- "dtslint" : " ^0.9.0 " ,
34
+ "dtslint" : " ^1.0.2 " ,
33
35
"nyc" : " ^14.0.0" ,
34
36
"prettier" : " ^1.0.0" ,
35
37
"remark-cli" : " ^7.0.0" ,
36
38
"remark-preset-wooorm" : " ^6.0.0" ,
37
39
"tape" : " ^4.0.0" ,
38
40
"tinyify" : " ^2.0.0" ,
39
- "typescript" : " ^3.5.3" ,
40
41
"unified" : " ^8.3.2" ,
41
42
"xo" : " ^0.24.0"
42
43
},
Original file line number Diff line number Diff line change 2
2
"compilerOptions" : {
3
3
"lib" : [" es2015" ],
4
4
"strict" : true ,
5
- "noImplicitAny" : true ,
6
- "noImplicitThis" : true ,
7
- "strictNullChecks" : true ,
8
- "strictFunctionTypes" : true ,
9
5
"baseUrl" : " ." ,
10
6
"paths" : {
11
7
"unist-util-is" : [" index.d.ts" ],
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " dtslint/dtslint.json" ,
3
3
"rules" : {
4
- "callable-types" : false ,
5
- "max-line-length" : false ,
6
- "no-redundant-jsdoc" : false ,
7
- "no-void-expression" : false ,
8
- "only-arrow-functions" : false ,
9
4
"semicolon" : false ,
10
- "unified-signatures" : false ,
11
- "whitespace" : false ,
12
- "interface-over-type-literal" : false ,
13
- "no-unnecessary-generics" : false
5
+ "whitespace" : false
14
6
}
15
7
}
Original file line number Diff line number Diff line change 1
1
import { Node , Parent } from 'unist'
2
+ import { Heading } from 'mdast'
2
3
import unified = require( 'unified' )
3
4
import is = require( 'unist-util-is' )
4
5
import convert = require( 'unist-util-is/convert' )
5
6
6
7
/*=== setup ===*/
7
- interface Heading extends Parent {
8
- type : 'heading'
9
- depth : number
10
- children : Node [ ]
11
- }
12
-
13
8
interface Element extends Parent {
14
9
type : 'element'
15
10
tagName : string
You can’t perform that action at this time.
0 commit comments