From aaf528a1db2f20a1cf8d0ba642121c1a8a98aec8 Mon Sep 17 00:00:00 2001 From: Geoffrey Casper Date: Sun, 7 Apr 2024 15:18:19 -0400 Subject: [PATCH] hive tx op types fast (#28) --- src/services/new/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/new/types.ts b/src/services/new/types.ts index f9d070b..d0b5d2e 100644 --- a/src/services/new/types.ts +++ b/src/services/new/types.ts @@ -333,9 +333,9 @@ export type HiveTransactionDbRecord = { operations: AnyOperation[] } -export type AnyOperation = IndexedKeysToTuple & ListOfOperations +export type AnyOperation = IndexedKeysToTuple -type IndexedKeysToTuple = [T[0], T[1]] +type IndexedKeysToTuple = T extends {0: infer A; 1: infer B} ? [A, B] : never type ListOfOperations = | AccountCreateOperation