You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue with import library in my typescript project. It said that there is no declarations for 'xpather' module.
Here is the diff that solved my problem:
diff --git a/node_modules/xpather/built/condition.d.ts b/node_modules/xpather/built/condition.d.ts
new file mode 100644
index 0000000..1fc03c2
--- /dev/null+++ b/node_modules/xpather/built/condition.d.ts@@ -0,0 +1,7 @@+export declare class Condition {+ private readonly condition;+ constructor(condition: string);+ or(...conditions: Condition[]): Condition;+ and(...conditions: Condition[]): Condition;+ toString(): string;+}diff --git a/node_modules/xpather/built/index.d.ts b/node_modules/xpather/built/index.d.ts
new file mode 100644
index 0000000..850fa34
--- /dev/null+++ b/node_modules/xpather/built/index.d.ts@@ -0,0 +1,5 @@+import { Xpath } from './xpath';+export { With } from './with';+export declare const x: typeof Xpath.x;+export declare const xpath: typeof Xpath.x;+export declare const root: Xpath;diff --git a/node_modules/xpather/built/with.d.ts b/node_modules/xpather/built/with.d.ts
new file mode 100644
index 0000000..81a898c
--- /dev/null+++ b/node_modules/xpather/built/with.d.ts@@ -0,0 +1,16 @@+import { Condition } from './condition';+export declare namespace With {+ function text(text: string): Condition;+ function exactText(exactText: string): Condition;+ function attribute(attributeName: string, attributeValue?: string): Condition;+ function exactAttribute(attributeName: string, attributeValue: string): Condition;+ function value(value: string): Condition;+ function exactValue(value: string): Condition;+ function id(value: string): Condition;+ function exactId(value: string): Condition;+ function name(value: string): Condition;+ function exactName(value: string): Condition;+ function position(index: number): Condition;+ function positionLast(): Condition;+ function count(tag: string, count: number): Condition;+}diff --git a/node_modules/xpather/built/xpath.d.ts b/node_modules/xpather/built/xpath.d.ts
new file mode 100644
index 0000000..1ac80d0
--- /dev/null+++ b/node_modules/xpather/built/xpath.d.ts@@ -0,0 +1,21 @@+import { Condition } from './condition';+export declare class Xpath {+ static readonly root: Xpath;+ static x(tag: string, ...conditions: Condition[]): Xpath;+ private readonly xpathString;+ constructor(xpathString: string, ...conditions: Condition[]);+ descendant(xpathString: string, ...conditions: Condition[]): Xpath;+ descendantOrSelf(xpathString: string, ...conditions: Condition[]): Xpath;+ child(xpathString: string, ...conditions: Condition[]): Xpath;+ parent(): Xpath;+ following(xpathString: string, ...conditions: Condition[]): Xpath;+ next(xpathString: string, ...conditions: Condition[]): Xpath;+ followingSibling(xpathString: string, ...conditions: Condition[]): Xpath;+ nextSibling(xpathString: string, ...conditions: Condition[]): Xpath;+ preceding(xpathString: string, ...conditions: Condition[]): Xpath;+ previous(xpathString: string, ...conditions: Condition[]): Xpath;+ precedingSibling(xpathString: string, ...conditions: Condition[]): Xpath;+ previousSibling(xpathString: string, ...conditions: Condition[]): Xpath;+ build(): string;+ toString(): string;+}diff --git a/node_modules/xpather/lib/tsconfig.json b/node_modules/xpather/lib/tsconfig.json
index 646ffb4..b2a7028 100644
--- a/node_modules/xpather/lib/tsconfig.json+++ b/node_modules/xpather/lib/tsconfig.json@@ -4,7 +4,7 @@
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
- "declaration": false,+ "declaration": true,
"removeComments": false,
"noImplicitAny": false,
"experimentalDecorators": true,
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.I had an issue with import library in my typescript project. It said that there is no declarations for 'xpather' module.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: