-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
31 lines (25 loc) · 968 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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,
tagName: string,
options?: { debug?: boolean, nested?: boolean, startIndex?: number }
): Tag | undefined;
export function findTagsByName(
xml: string,
tagName: string,
options?: { debug?: boolean, nested?: boolean, startIndex?: boolean }
): Tag[];
export function findTagsByPath(
xml: string,
path: Path,
options?: { debug?: boolean, returnOnFirst?: boolean }
): Tag[];
export function findTagByPath(
xml: string,
path: Path,
options?: { debug?: boolean }
): Tag | undefined;
export function getAttribute(tag: string | Tag, attributeName: string, options?: { debug?: boolean } ): string;
export function removeTagsByName(xml: string, tagName: string, options?: { debug?: boolean }): string;