Skip to content

Commit 8169ffb

Browse files
Move ICharTrie types to ambient file
This will automatically share the type to all files. Avoid error when generating Jest coverage report.
1 parent 5b23c11 commit 8169ffb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
},
1919
"jest": {
2020
"collectCoverageFrom": [
21-
"**/src/**/?*.(js|ts)"
21+
"**/src/**/?*.(js|ts)",
22+
"!**/src/**/?*.d.ts"
2223
],
2324
"transform": {
2425
"^.+\\.ts$": "ts-jest"

src/types/iCharTree.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
type Char = string;
2+
interface ICharTrie extends Record<Char, CharNode> {}
3+
type CharNode = ICharTrie;

src/utils/trie.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { keys, map, partition, uniq } from 'lodash';
22

3-
type Char = string;
4-
interface ICharTrie extends Record<Char, CharNode> {}
5-
type CharNode = ICharTrie;
6-
73
const leafNode: CharNode = {};
84

95
/**

0 commit comments

Comments
 (0)