Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Nov 18, 2023
1 parent 3c2bf67 commit 1ba379e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 0 additions & 2 deletions packages/seroval/src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,3 @@ export const ERROR_CONSTRUCTOR: Record<ErrorConstructorTag, ErrorConstructors> =
[ErrorConstructorTag.TypeError]: TypeError,
[ErrorConstructorTag.URIError]: URIError,
};

export const UNIVERSAL_SENTINEL = {};
2 changes: 1 addition & 1 deletion packages/seroval/src/core/context/parser/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
import { BIGINT_FLAG, Feature } from '../../compat';
import {
SerovalNodeType,
UNIVERSAL_SENTINEL,
} from '../../constants';
import {
createRequestOptions,
Expand Down Expand Up @@ -80,6 +79,7 @@ import {
createCustomEventNode,
createReadableStreamNode,
} from '../../web-api';
import { UNIVERSAL_SENTINEL } from '../../special-reference';

type ObjectLikeNode =
| SerovalObjectNode
Expand Down
3 changes: 2 additions & 1 deletion packages/seroval/src/core/context/parser/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import type { BaseSyncParserContextOptions } from './sync';
import BaseSyncParserContext from './sync';
import { BIGINT_FLAG, Feature } from '../../compat';
import { SerovalNodeType, UNIVERSAL_SENTINEL } from '../../constants';
import { SerovalNodeType } from '../../constants';
import { createRequestOptions, createResponseOptions } from '../../utils/constructors';
import { FALSE_NODE, NULL_NODE, TRUE_NODE } from '../../literals';
import { serializeString } from '../../string';
Expand All @@ -28,6 +28,7 @@ import type {
} from '../../types';
import { createDOMExceptionNode, createURLNode, createURLSearchParamsNode } from '../../web-api';
import { asyncIteratorToReadableStream, iteratorToSequence } from '../../utils/iterator-to-sequence';
import { UNIVERSAL_SENTINEL } from '../../special-reference';

export interface BaseStreamParserContextOptions extends BaseSyncParserContextOptions {
onParse: (node: SerovalNode, initial: boolean) => void;
Expand Down
2 changes: 1 addition & 1 deletion packages/seroval/src/core/context/parser/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { BIGINT_FLAG, Feature } from '../../compat';
import type { WellKnownSymbols } from '../../constants';
import {
SerovalNodeType,
UNIVERSAL_SENTINEL,
} from '../../constants';
import { createCustomEventOptions, createEventOptions } from '../../utils/constructors';
import {
Expand Down Expand Up @@ -69,6 +68,7 @@ import {
createURLNode,
createURLSearchParamsNode,
} from '../../web-api';
import { UNIVERSAL_SENTINEL } from '../../special-reference';

type ObjectLikeNode =
| SerovalObjectNode
Expand Down
9 changes: 1 addition & 8 deletions packages/seroval/src/core/special-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,4 @@ export const ASYNC_ITERATOR = {};

export const READABLE_STREAM = {};

export const enum SpecialReference {
Sentinel = 0,
SymbolIterator = 1,
IteratorFactory = 2,
SymbolAsyncIterator = 3,
AsyncIteratorFactory = 4,
ReadableStreamFactory = 5,
}
export const UNIVERSAL_SENTINEL = {};

0 comments on commit 1ba379e

Please sign in to comment.