Skip to content

Commit

Permalink
fix: reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n committed Jan 25, 2025
1 parent 6a51c91 commit 037cf69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
12 changes: 2 additions & 10 deletions packages/apidom-ns-json-schema-2019-09/src/traversal/visitor.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
import { keyMap as keyMapBase, isElement, Element } from '@swagger-api/apidom-core';
import { keyMap as keyMapBase } from '@swagger-api/apidom-core';

/**
* @public
*/
export const getNodeType = <T extends Element>(element: T): string | undefined => {
if (!isElement(element)) {
return undefined;
}
return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
};
export { getNodeType } from '@swagger-api/apidom-ns-json-schema-draft-7';

/**
* @public
Expand Down
13 changes: 2 additions & 11 deletions packages/apidom-ns-json-schema-2020-12/src/traversal/visitor.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import { keyMap as keyMapBase, isElement, Element } from '@swagger-api/apidom-core';

/**
* @public
*/
export const getNodeType = <T extends Element>(element: T): string | undefined => {
if (!isElement(element)) {
return undefined;
}
return `${element.element.charAt(0).toUpperCase() + element.element.slice(1)}Element`;
};
import { keyMap as keyMapBase } from '@swagger-api/apidom-core';

export { getNodeType } from '@swagger-api/apidom-ns-json-schema-2019-09';
/**
* @public
*/
Expand Down

0 comments on commit 037cf69

Please sign in to comment.