From 68e8ff6e8042d51d70fbd1c028fcb53fc6ee2cc7 Mon Sep 17 00:00:00 2001 From: KATT Date: Sat, 7 Oct 2023 18:09:27 +0200 Subject: [PATCH] wip --- src/sync/deserialize.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sync/deserialize.ts b/src/sync/deserialize.ts index 171c8b62..4082b505 100644 --- a/src/sync/deserialize.ts +++ b/src/sync/deserialize.ts @@ -65,9 +65,9 @@ export function createTsonParser(opts: TsonOptions): TsonParseFn { } return ((str: string) => { - const ret = deserializer(JSON.parse(str) as TsonSerialized); let nonce = ""; - JSON.parse(str, (key, value) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return JSON.parse(str, (key, value) => { if (!nonce && key === "_nonce") { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment nonce = value; @@ -88,6 +88,5 @@ export function createTsonParser(opts: TsonOptions): TsonParseFn { // eslint-disable-next-line @typescript-eslint/no-unsafe-return return value; }); - return ret; }) as TsonParseFn; }