Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Oct 7, 2023
1 parent b648bba commit 12e8d7b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/async/handlers/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// Async types
export * from "./tsonPromise.js";
export * from "./tsonAsyncIterable.js";
14 changes: 4 additions & 10 deletions src/async/handlers/tsonPromise.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,23 @@ import { assert, expect, test } from "vitest";
import {
TsonAsyncOptions,
TsonType,
createAsyncTsonSerialize,
createTsonAsync,
createTsonParseAsync,
createTsonStringifyAsync,
tsonPromise,
} from "../../index.js";
import {
createTestServer,
waitError,
waitFor,
} from "../../internals/testUtils.js";
import { TsonSerialized } from "../../sync/syncTypes.js";
import { createTsonParseAsyncInner } from "../deserializeAsync.js";
import {
mapIterable,
readableStreamToAsyncIterable,
} from "../iterableUtils.js";
import {
TsonAsyncValueTuple,
createAsyncTsonSerialize,
createTsonStringifyAsync,
} from "../serializeAsync.js";
import { TsonAsyncValueTuple } from "../serializeAsync.js";

const createPromise = <T>(result: () => T, wait = 1) => {
return new Promise<T>((resolve, reject) => {
Expand Down Expand Up @@ -286,10 +283,7 @@ test("stringifier - promise in promise", async () => {
buffer.push(value.trimEnd());
}

const full = JSON.parse(buffer.join("")) as [
TsonSerialized,
TsonAsyncValueTuple[],
];
const full = JSON.parse(buffer.join("")) as [unknown, TsonAsyncValueTuple[]];

const [head, values] = full;
expect(head).toMatchInlineSnapshot(`
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ export * from "./sync/handlers/index.js";
// async
export { createTsonAsync } from "./async/createTsonAsync.js";
export { createTsonParseAsync } from "./async/deserializeAsync.js";
export { createTsonStringifyAsync } from "./async/serializeAsync.js";
export {
createAsyncTsonSerialize,
createTsonStringifyAsync,
} from "./async/serializeAsync.js";
export * from "./async/handlers/index.js";

// types
Expand Down

0 comments on commit 12e8d7b

Please sign in to comment.