@getodk/xpath 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,13 +2,10 @@ import { WHATAttribute, WHATChildNode, WHATComment, WHATDocument, WHATElement, W
|
|
|
2
2
|
import { WHATDOMAdapter } from './WHAT/whatDOMAdapter.ts';
|
|
3
3
|
import { XPathDOMProvider } from './xpathDOMProvider.ts';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* sites, internally but especially at the package boundary.
|
|
5
|
+
* This is for clarity at usage and reference sites,
|
|
6
|
+
* internally but especially at the package boundary.
|
|
8
7
|
*/
|
|
9
|
-
type AsDefault<T> = T
|
|
10
|
-
readonly _?: never;
|
|
11
|
-
});
|
|
8
|
+
type AsDefault<T> = T;
|
|
12
9
|
type DefaultDOMAdapter = AsDefault<WHATDOMAdapter>;
|
|
13
10
|
type DefaultDOMProvider = AsDefault<XPathDOMProvider<WHATNode>>;
|
|
14
11
|
export declare const DEFAULT_DOM_ADAPTER: DefaultDOMAdapter;
|
|
@@ -7,7 +7,7 @@ export { ENKETO_NAMESPACE_URI, ENKETO_PREFIX, FN_NAMESPACE_URI, FN_PREFIX, HTML_
|
|
|
7
7
|
export interface StaticNamespaces<DefaultPrefix extends string, DefaultURI extends string, Mapping extends Record<string, string>> {
|
|
8
8
|
get<Key extends string | null>(key: Key): Key extends null ? DefaultURI : Key extends DefaultPrefix ? DefaultURI : Key extends keyof Mapping ? Mapping[Key] : undefined;
|
|
9
9
|
has(key: null): true;
|
|
10
|
-
has(key: DefaultPrefix
|
|
10
|
+
has(key: DefaultPrefix): true;
|
|
11
11
|
has(key: keyof Mapping): true;
|
|
12
12
|
has(key: string): false;
|
|
13
13
|
}
|