Skip to content

Commit 464afb6

Browse files
committed
Refactor code-style
1 parent 38b41f0 commit 464afb6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
* @typedef {import('hast').Element} Element
55
*
66
* @typedef {string} TagName
7-
* @typedef {null|undefined|TagName|TestFunctionAnything|Array.<TagName|TestFunctionAnything>} Test
7+
* @typedef {null|undefined|TagName|TestFunctionAnything|Array<TagName|TestFunctionAnything>} Test
88
*/
99

1010
/**
1111
* @template {Element} T
12-
* @typedef {null|undefined|T['tagName']|TestFunctionPredicate<T>|Array.<T['tagName']|TestFunctionPredicate<T>>} PredicateTest
12+
* @typedef {null|undefined|T['tagName']|TestFunctionPredicate<T>|Array<T['tagName']|TestFunctionPredicate<T>>} PredicateTest
1313
*/
1414

1515
/**
@@ -159,11 +159,11 @@ export const convertElement =
159159
)
160160

161161
/**
162-
* @param {Array.<TagName|TestFunctionAnything>} tests
162+
* @param {Array<TagName|TestFunctionAnything>} tests
163163
* @returns {AssertAnything}
164164
*/
165165
function anyFactory(tests) {
166-
/** @type {Array.<AssertAnything>} */
166+
/** @type {Array<AssertAnything>} */
167167
const checks = []
168168
let index = -1
169169

@@ -175,7 +175,7 @@ function anyFactory(tests) {
175175

176176
/**
177177
* @this {unknown}
178-
* @param {unknown[]} parameters
178+
* @param {Array<unknown>} parameters
179179
* @returns {boolean}
180180
*/
181181
function any(...parameters) {
@@ -220,7 +220,7 @@ function castFactory(check) {
220220
/**
221221
* @this {unknown}
222222
* @param {unknown} node
223-
* @param {Array.<unknown>} parameters
223+
* @param {Array<unknown>} parameters
224224
* @returns {boolean}
225225
*/
226226
function assertion(node, ...parameters) {

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ There is no default export.
4444
Check if the given value is a (certain) [*element*][element].
4545

4646
* `node` ([`Node`][node]) — Node to check.
47-
* `test` ([`Function`][test], `string`, or `Array.<Test>`, optional)
47+
* `test` ([`Function`][test], `string`, or `Array<Test>`, optional)
4848
— When `array`, checks if any one of the subtests pass.
4949
When `string`, checks that the element has that tag name.
5050
When `function`, see [`test`][test]

0 commit comments

Comments
 (0)