Skip to content

Commit 82b9c25

Browse files
authored
Refactor to simplify types w/ ReadonlyArray
Closes GH-20. Reviewed-by: Remco Haszing <[email protected]> Reviewed-by: Christian Murphy <[email protected]> Reviewed-by: Titus Wormer <[email protected]>
1 parent ebfb3f6 commit 82b9c25

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* Note: `Node` is included as it is common but is not indexable.
2929
*
30-
* @typedef {Array<Props | TestFunction | string> | ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test
30+
* @typedef {ReadonlyArray<Props | TestFunction | string> | Props | TestFunction | string | null | undefined} Test
3131
* Check for an arbitrary node.
3232
*
3333
* @callback TestFunction
@@ -67,7 +67,6 @@ export const is =
6767
/**
6868
* @type {(
6969
* (<Condition extends ReadonlyArray<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
70-
* (<Condition extends Array<string>>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) &
7170
* (<Condition extends string>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
7271
* (<Condition extends Props>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
7372
* (<Condition extends TestFunction>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &

0 commit comments

Comments
 (0)