Skip to content

Commit

Permalink
Use @types/nlcst
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 27, 2021
1 parent 7cd9ac5 commit 8f0c45c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/factory.js
@@ -1,14 +1,17 @@
/**
* @typedef {import('nlcst').Root} Root
* @typedef {import('nlcst').Sentence} Sentence
* @typedef {import('nlcst').SentenceContent} SentenceContent
* @typedef {import('nlcst').Content} Content
* @typedef {import('nlcst').Parent} Parent
* @typedef {import('vfile').VFile} VFile
* @typedef {import('nlcst-search').Handler} SearchHandle
* @typedef {import('unist').Parent} Parent
* @typedef {import('unist').Node} Node
* @typedef {import('./en.js').Pattern} Pattern
*
* @typedef Match
* @property {string} type
* @property {Parent} parent
* @property {Node[]} nodes
* @property {Content[]} nodes
* @property {number} start
* @property {number} end
*
Expand Down Expand Up @@ -55,7 +58,7 @@ export function factory(patterns, lang) {

unpack()

/** @type {import('unified').Plugin<[Options?]>} */
/** @type {import('unified').Plugin<[Options?], Root>} */
return (options = {}) => {
const ignore = options.ignore || []
const noBinary = options.noBinary
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -62,6 +62,7 @@
"index.js"
],
"dependencies": {
"@types/nlcst": "^1.0.0",
"@types/unist": "^2.0.6",
"nlcst-normalize": "^3.0.0",
"nlcst-search": "^3.0.0",
Expand Down

0 comments on commit 8f0c45c

Please sign in to comment.