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

Commit

Permalink
stream
Browse files Browse the repository at this point in the history
  • Loading branch information
KATT committed Oct 6, 2023
1 parent 4224a94 commit 8986920
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/async/deserializeAsync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ test("deserialize promise", async () => {
types: [tsonAsyncIterator, tsonPromise, tsonBigint],
});

// {
// // plain obj
// const obj = {
// foo: "bar",
// };
{
// plain obj
const obj = {
foo: "bar",
};

// const strIterable = tson.stringify(obj);
const strIterable = tson.stringify(obj);

// const result = await tson.parse(strIterable);
const result = await tson.parse(strIterable);

// expect(result).toEqual(obj);
// }
expect(result).toEqual(obj);
}

{
// promise
Expand Down
1 change: 1 addition & 0 deletions src/async/deserializeAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export function createTsonParseAsyncInner(opts: TsonAsyncOptions) {
assert(item, `No stream found for index ${index}`);

// FIXME: I don't know why this requires array buffer
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
item.controller.enqueue(walkedResult as any);
}

Expand Down

0 comments on commit 8986920

Please sign in to comment.