File tree Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Expand file tree Collapse file tree 4 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
+ * .d.ts
2
3
* .log
3
4
coverage /
4
5
node_modules /
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @typedef {import('mdast').PhrasingContent } PhrasingContent
3
+ * @typedef {import('unist-util-is').AssertPredicate<PhrasingContent> } AssertPredicatePhrasing
4
+ */
5
+
1
6
import { convert } from 'unist-util-is'
2
7
8
+ /**
9
+ * @type {AssertPredicatePhrasing }
10
+ */
11
+ // @ts -ignore hush, it’s fine!
3
12
export const phrasing = convert ( [
4
13
'break' ,
5
14
'delete' ,
@@ -14,5 +23,3 @@ export const phrasing = convert([
14
23
'strong' ,
15
24
'text'
16
25
] )
17
-
18
- phrasing . displayName = 'isPhrasing'
Original file line number Diff line number Diff line change 26
26
"sideEffects" : false ,
27
27
"type" : " module" ,
28
28
"main" : " index.js" ,
29
+ "types" : " index.d.ts" ,
29
30
"files" : [
31
+ " index.d.ts" ,
30
32
" index.js"
31
33
],
32
34
"dependencies" : {
35
+ "@types/mdast" : " ^3.0.0" ,
33
36
"unist-util-is" : " ^5.0.0"
34
37
},
35
38
"devDependencies" : {
39
+ "@types/tape" : " ^4.0.0" ,
36
40
"c8" : " ^7.0.0" ,
37
41
"prettier" : " ^2.0.0" ,
38
42
"remark-cli" : " ^9.0.0" ,
39
43
"remark-preset-wooorm" : " ^8.0.0" ,
44
+ "rimraf" : " ^3.0.0" ,
40
45
"tape" : " ^5.0.0" ,
46
+ "type-coverage" : " ^2.0.0" ,
47
+ "typescript" : " ^4.0.0" ,
41
48
"xo" : " ^0.38.0"
42
49
},
43
50
"scripts" : {
51
+ "prepack" : " npm run build && npm run format" ,
52
+ "build" : " rimraf \" *.d.ts\" && tsc && type-coverage" ,
44
53
"format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix" ,
45
54
"test-api" : " node test.js" ,
46
55
"test-coverage" : " c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node test.js" ,
47
- "test" : " npm run format && npm run test-coverage"
56
+ "test" : " npm run build && npm run format && npm run test-coverage"
48
57
},
49
58
"prettier" : {
50
59
"tabWidth" : 2 ,
65
74
"plugins" : [
66
75
" preset-wooorm"
67
76
]
77
+ },
78
+ "typeCoverage" : {
79
+ "atLeast" : 100 ,
80
+ "detail" : true ,
81
+ "strict" : true
68
82
}
69
83
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "include" : [" *.js" ],
3
+ "compilerOptions" : {
4
+ "target" : " ES2020" ,
5
+ "lib" : [" ES2020" ],
6
+ "module" : " ES2020" ,
7
+ "moduleResolution" : " node" ,
8
+ "allowJs" : true ,
9
+ "checkJs" : true ,
10
+ "declaration" : true ,
11
+ "emitDeclarationOnly" : true ,
12
+ "allowSyntheticDefaultImports" : true ,
13
+ "skipLibCheck" : true
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments