File tree 5 files changed +43
-4
lines changed
5 files changed +43
-4
lines changed Original file line number Diff line number Diff line change 25
25
" Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
26
26
],
27
27
"files" : [
28
- " index.js"
28
+ " index.js" ,
29
+ " types/index.d.ts"
29
30
],
30
- "dependencies " : {} ,
31
+ "types " : " types/index.d.ts " ,
31
32
"devDependencies" : {
32
33
"browserify" : " ^17.0.0" ,
34
+ "dtslint" : " ^4.0.0" ,
33
35
"nyc" : " ^15.0.0" ,
34
36
"prettier" : " ^2.0.0" ,
35
37
"remark-cli" : " ^9.0.0" ,
45
47
"build" : " npm run build-bundle && npm run build-mangle" ,
46
48
"test-api" : " node test" ,
47
49
"test-coverage" : " nyc --reporter lcov tape test.js" ,
48
- "test" : " npm run format && npm run build && npm run test-coverage"
50
+ "test-types" : " dtslint types" ,
51
+ "test" : " npm run format && npm run build && npm run test-coverage && npm run test-types"
49
52
},
50
53
"prettier" : {
51
54
"tabWidth" : 2 ,
59
62
"prettier" : true ,
60
63
"esnext" : false ,
61
64
"ignore" : [
62
- " mdast-util-to-string.js"
65
+ " mdast-util-to-string.js" ,
66
+ " types/test.ts"
63
67
]
64
68
},
65
69
"nyc" : {
Original file line number Diff line number Diff line change
1
+ // Minimum TypeScript Version: 3.0
2
+ import { Node } from 'unist'
3
+
4
+ declare namespace mdastToString { }
5
+
6
+ declare function mdastToString ( node : Node | Node [ ] ) : string
7
+
8
+ export = mdastToString
Original file line number Diff line number Diff line change
1
+ import * as mdastUtilToString from 'mdast-util-to-string'
2
+
3
+ mdastUtilToString ( ) // $ExpectError
4
+ mdastUtilToString ( { type : 'root' } ) // $ExpectType string
5
+ mdastUtilToString ( [ { type : 'root' } ] ) // $ExpectType string
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "moduleResolution" : " node" ,
4
+ "lib" : [
5
+ " ES5"
6
+ ],
7
+ "strict" : true ,
8
+ "baseUrl" : " ." ,
9
+ "paths" : {
10
+ "mdast-util-to-string" : [
11
+ " ./index.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " dtslint/dtslint.json" ,
3
+ "rules" : {
4
+ "semicolon" : false ,
5
+ "whitespace" : false
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments