From 8b8a2b163a8120e2682c3f0147ec820d8b64d2a7 Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 20 Oct 2025 22:23:41 +0800 Subject: [PATCH] Simplify types with `ReadonlyArray` only --- lib/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 4acb3c3..833eeed 100644 --- a/lib/index.js +++ b/lib/index.js @@ -27,7 +27,7 @@ * * Note: `Node` is included as it is common but is not indexable. * - * @typedef {Array | ReadonlyArray | Props | TestFunction | string | null | undefined} Test + * @typedef {ReadonlyArray | Props | TestFunction | string | null | undefined} Test * Check for an arbitrary node. * * @callback TestFunction @@ -67,7 +67,6 @@ export const is = /** * @type {( * (>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) & - * (>(node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition[number]}) & * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) & * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) & * ((node: unknown, test: Condition, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate) &