Files
coopgo/node_modules/xml-utils/index.d.ts
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

32 lines
968 B
TypeScript

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;