Skip to content

Commit

Permalink
Update @types/nlcst, utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 17, 2023
1 parent 293e092 commit 3a2a7af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 5 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
* @typedef {import('unist').Parent} UnistParent
* @typedef {import('unist-util-assert').AssertionError} AssertionError
*
* @typedef {import('nlcst').Nodes} Nodes
* @typedef {import('nlcst').Parents} Parents
* @typedef {import('nlcst').Root} Root
* @typedef {import('nlcst').Content} Content
*/

/**
* @typedef {Root | Content} Node
* @typedef {Extract<Node, UnistParent>} Parent
*/

import nodeAssert from 'node:assert'
Expand All @@ -33,7 +29,7 @@ import {
* Thing to assert.
* @param {UnistParent | null | undefined} [parent]
* Optional, valid parent.
* @returns {asserts tree is Node}
* @returns {asserts tree is Nodes}
* Nothing.
* @throws {AssertionError}
* When `tree` (or its descendants) is not a nlcst node.
Expand All @@ -53,7 +49,7 @@ export function assert(tree, parent) {
* Thing to assert.
* @param {UnistParent | null | undefined} [parent]
* Optional, valid parent.
* @returns {asserts tree is Parent}
* @returns {asserts tree is Parents}
* Nothing.
* @throws {AssertionError}
* When `tree` is not a parent or its descendants are not nodes.
Expand Down Expand Up @@ -107,7 +103,7 @@ function unknown(node, parent) {
*
* @param {unknown} [tree]
* Thing to assert.
* @returns {asserts tree is Parent}
* @returns {asserts tree is Parents}
* Nothing.
* @throws {AssertionError}
* When `tree` is not a parent or its descendants are not nodes.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"index.js"
],
"dependencies": {
"@types/nlcst": "^1.0.0",
"@types/unist": "^2.0.0",
"@types/nlcst": "^2.0.0",
"@types/unist": "^3.0.0",
"mapz": "^2.0.0",
"unist-util-assert": "^3.0.0",
"unist-util-assert": "^4.0.0",
"zwitch": "^2.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 3a2a7af

Please sign in to comment.