From 1e3a209a36897cf72e3a100a0fa757f7a0336e8b Mon Sep 17 00:00:00 2001 From: DanielJDufour Date: Sun, 2 Jun 2024 17:00:27 -0400 Subject: [PATCH] updated path type to findTagByPath --- index.d.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 8892d77..ce1564c 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,6 @@ export type Tag = { inner: null | string, outer: string }; export type Step = { name: string, index?: number | undefined | null }; +export type Path = Array | ReadonlyArray; export function findTagByName( xml: string, @@ -15,13 +16,13 @@ export function findTagsByName( export function findTagsByPath( xml: string, - path: Array | ReadonlyArray, + path: Path, options?: { debug?: boolean, returnOnFirst?: boolean } ): Tag[]; export function findTagByPath( xml: string, - path: string[], + path: Path, options?: { debug?: boolean } ): Tag | undefined;