Skip to content

Commit

Permalink
I think this is actually the best way to fix this
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Apr 26, 2024
1 parent fe6721a commit 4b498a0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
22 changes: 21 additions & 1 deletion src/mock-doc/constants.ts
@@ -1 +1,21 @@
export { NODE_NAMES, NODE_TYPES } from '@utils/constants';
export const enum NODE_TYPES {
ELEMENT_NODE = 1,
ATTRIBUTE_NODE = 2,
TEXT_NODE = 3,
CDATA_SECTION_NODE = 4,
ENTITY_REFERENCE_NODE = 5,
ENTITY_NODE = 6,
PROCESSING_INSTRUCTION_NODE = 7,
COMMENT_NODE = 8,
DOCUMENT_NODE = 9,
DOCUMENT_TYPE_NODE = 10,
DOCUMENT_FRAGMENT_NODE = 11,
NOTATION_NODE = 12,
}

export const enum NODE_NAMES {
COMMENT_NODE = '#comment',
DOCUMENT_NODE = '#document',
DOCUMENT_FRAGMENT_NODE = '#document-fragment',
TEXT_NODE = '#text',
}
12 changes: 5 additions & 7 deletions src/utils/constants.ts
Expand Up @@ -232,6 +232,11 @@ export const VALID_CONFIG_OUTPUT_TARGETS = [

export const GENERATED_DTS = 'components.d.ts';

/**
* DOM Node types
*
* See https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
*/
export const enum NODE_TYPES {
ELEMENT_NODE = 1,
ATTRIBUTE_NODE = 2,
Expand All @@ -246,10 +251,3 @@ export const enum NODE_TYPES {
DOCUMENT_FRAGMENT_NODE = 11,
NOTATION_NODE = 12,
}

export const enum NODE_NAMES {
COMMENT_NODE = '#comment',
DOCUMENT_NODE = '#document',
DOCUMENT_FRAGMENT_NODE = '#document-fragment',
TEXT_NODE = '#text',
}

0 comments on commit 4b498a0

Please sign in to comment.