diff --git a/examples/async/src/client.ts b/examples/async/src/client.ts index 5ca6bff6..e09a4a32 100644 --- a/examples/async/src/client.ts +++ b/examples/async/src/client.ts @@ -25,8 +25,7 @@ async function main() { ); // ✨ ✨ ✨ ✨ parse the response body stream ✨ ✨ ✨ ✨ ✨ - const parsedUntyped = await tsonAsync.parse(stringIterator); - const output = parsedUntyped as ResponseShape; + const output = await tsonAsync.parse(stringIterator); // we can now use the output as a normal object console.log({ output }); diff --git a/src/async/deserializeAsync.test.ts b/src/async/deserializeAsync.test.ts index acd6d6af..16cdb49b 100644 --- a/src/async/deserializeAsync.test.ts +++ b/src/async/deserializeAsync.test.ts @@ -183,8 +183,7 @@ test("e2e: stringify async iterable and promise over the network", async () => { (v) => textDecoder.decode(v), ); - const parsedRaw = await tson.parse(stringIterator); - const parsed = parsedRaw as MockObj; + const parsed = await tson.parse(stringIterator); expect(parsed.foo).toEqual("bar");