Skip to content

Commit 0d5dab8

Browse files
committed
cleanup clear
1 parent a2cf500 commit 0d5dab8

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/schema-converters/internalToExpanded.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import { allowAbort } from './util';
77
const createConvertInternalToExpanded = function() {
88
const usedDefinitions = new Set<string>();
99

10-
function clearUsedDefinitions() {
11-
usedDefinitions.clear();
12-
}
13-
1410
function getUsedDefinitions() {
1511
const filteredDefinitions = Object.fromEntries(
1612
Object.entries(RELAXED_EJSON_DEFINITIONS).filter(([key]) => usedDefinitions.has(key))
@@ -102,7 +98,6 @@ const createConvertInternalToExpanded = function() {
10298
internalSchema: InternalSchema,
10399
options: { signal?: AbortSignal } = {}
104100
): Promise<ExpandedJSONSchema> {
105-
clearUsedDefinitions();
106101
const { required, properties } = await parseFields(internalSchema.fields, options.signal);
107102
const schema: ExpandedJSONSchema = {
108103
type: 'object',

src/schema-converters/internalToStandard.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ export const RELAXED_EJSON_DEFINITIONS = {
250250
const createConvertInternalToStandard = function() {
251251
const usedDefinitions = new Set<string>();
252252

253-
function clearUsedDefinitions() {
254-
usedDefinitions.clear();
255-
}
256-
257253
function getUsedDefinitions() {
258254
const filteredDefinitions = Object.fromEntries(
259255
Object.entries(RELAXED_EJSON_DEFINITIONS).filter(([key]) => usedDefinitions.has(key))
@@ -325,7 +321,6 @@ const createConvertInternalToStandard = function() {
325321
internalSchema: InternalSchema,
326322
options: { signal?: AbortSignal } = {}
327323
): Promise<StandardJSONSchema> {
328-
clearUsedDefinitions();
329324
const { required, properties } = await parseFields(internalSchema.fields, options.signal);
330325
const schema: StandardJSONSchema = {
331326
$schema: 'https://json-schema.org/draft/2020-12/schema',

0 commit comments

Comments
 (0)