File tree Expand file tree Collapse file tree 3 files changed +40
-4
lines changed Expand file tree Collapse file tree 3 files changed +40
-4
lines changed Original file line number Diff line number Diff line change 34
34
" types/index.d.ts"
35
35
],
36
36
"types" : " types/index.d.ts" ,
37
+ "ignores" : [
38
+ " types"
39
+ ],
37
40
"dependencies" : {
38
- "dtslint" : " ^4.0.7" ,
39
41
"unist-util-is" : " ^4.0.0"
40
42
},
41
43
"devDependencies" : {
44
+ "dtslint" : " ^4.0.0" ,
42
45
"nyc" : " ^15.0.0" ,
43
46
"prettier" : " ^2.0.0" ,
44
47
"remark-cli" : " ^9.0.0" ,
51
54
"format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix" ,
52
55
"test-api" : " node test" ,
53
56
"test-coverage" : " nyc --reporter lcov tape test.js" ,
54
- "test" : " npm run format && npm run test-coverage " ,
55
- "test-types " : " dtslint types"
57
+ "test-types " : " dtslint types " ,
58
+ "test" : " npm run format && npm run test-coverage && npm run test- types"
56
59
},
57
60
"nyc" : {
58
61
"check-coverage" : true ,
88
91
" preset-wooorm"
89
92
]
90
93
}
91
- }
94
+ }
Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ import { Test } from 'unist-util-is';
5
5
6
6
declare namespace remove {
7
7
interface RemoveOptions {
8
+ /**
9
+ * Whether to drop parent nodes if they had children, but all their children were filtered out test
10
+ */
8
11
cascade ?: boolean ;
9
12
}
10
13
}
@@ -17,6 +20,11 @@ declare namespace remove {
17
20
* @param options Whether to drop parent nodes if they had children, but all their children were filtered out
18
21
* @param test is-compatible test (such as a type)
19
22
*/
23
+ declare function remove (
24
+ tree : Node ,
25
+ test ?: Test < Node >
26
+ ) : Node ;
27
+
20
28
declare function remove (
21
29
tree : Node ,
22
30
options : remove . RemoveOptions = { cascade : true } ,
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "target" : " es2017" ,
4
+ "lib" : [" es6" ],
5
+ "module" : " commonjs" ,
6
+ "moduleResolution" : " node" ,
7
+ "resolveJsonModule" : true ,
8
+ "esModuleInterop" : false ,
9
+ "strict" : true ,
10
+ "strictPropertyInitialization" : false ,
11
+ "experimentalDecorators" : true ,
12
+ "emitDecoratorMetadata" : true ,
13
+ "sourceMap" : true ,
14
+ "skipLibCheck" : true
15
+ },
16
+ "include" : [
17
+ " ./**/*.ts" ,
18
+ " ./node_modules/@types"
19
+ ],
20
+ "exclude" : [
21
+ " node_modules" ,
22
+ " coverage"
23
+ ]
24
+ }
25
+
You can’t perform that action at this time.
0 commit comments