Skip to content

Commit

Permalink
updated path type to findTagByPath
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Jun 2, 2024
1 parent 9dd8aeb commit 1e3a209
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -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<string | Step> | ReadonlyArray<string | Step>;

export function findTagByName(
xml: string,
Expand All @@ -15,13 +16,13 @@ export function findTagsByName(

export function findTagsByPath(
xml: string,
path: Array<string | Step> | ReadonlyArray<string | Step>,
path: Path,
options?: { debug?: boolean, returnOnFirst?: boolean }
): Tag[];

export function findTagByPath(
xml: string,
path: string[],
path: Path,
options?: { debug?: boolean }
): Tag | undefined;

Expand Down

0 comments on commit 1e3a209

Please sign in to comment.