Skip to content

Commit

Permalink
Remove all remaining WHAT DOM access which isn’t encapsulated by what…
Browse files Browse the repository at this point in the history
…DOMAdapter*

* I manually validated this by looking for any references in project to the types in DOM.compat-min.ts. One minor **type only** exception is references to types of the `XPathResult.*_TYPE` constants. This does suggest that there’s some small risk that future maintenance may mistakenly reintroduce WHAT DOM access somewhere it isn’t expected and encapsulated. The risk should be very small so long as we retain the opaque nature of `XPathNode` and its subtypes.
  • Loading branch information
eyelidlessness committed Oct 31, 2024
1 parent dec1939 commit de08826
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 236 deletions.
23 changes: 0 additions & 23 deletions packages/xpath/src/adapter/WHAT/WHATNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,3 @@ export type WHATNamedNode = UnwrappableWHATNodeUnion<
// eslint-disable-next-line @typescript-eslint/sort-type-constituents
Element | Attr
>;

/**
* @todo This is temporary! It can be removed once existing WHAT Working Group
* DOM access is fully isolated to the WHAT adapter. In so doing, it also makes
* sense to invert the interface extension relationship and remove direct
* {@link XPathNodeKindKey} definitions on each of the `WHAT*` interfaces. (We
* cannot do that now, because it would create an inheritance cycle.)
*/
declare module '../interface/XPathNode.ts' {
export interface XPathDocument extends WHATDocument {}

export interface XPathElement extends WHATElement {}

export interface XPathNamespaceDeclaration extends WHATNamespaceDeclaration {}

export interface XPathAttribute extends WHATAttribute {}

export interface XPathText extends WHATText {}

export interface XPathComment extends WHATComment {}

export interface XPathProcessingInstruction extends WHATProcessingInstruction {}
}
9 changes: 0 additions & 9 deletions packages/xpath/src/lib/dom/assertions.ts

This file was deleted.

41 changes: 0 additions & 41 deletions packages/xpath/src/lib/dom/predicates.ts

This file was deleted.

38 changes: 0 additions & 38 deletions packages/xpath/src/lib/dom/sort.ts

This file was deleted.

53 changes: 0 additions & 53 deletions packages/xpath/src/lib/dom/traversal.ts

This file was deleted.

72 changes: 0 additions & 72 deletions packages/xpath/src/lib/dom/types.ts

This file was deleted.

0 comments on commit de08826

Please sign in to comment.