From b1fac7505484bf62fde044ca0c6c9895b3678859 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Thu, 26 Sep 2024 16:23:49 -0600 Subject: [PATCH] fix(types): remove restricted type This makes the type frustrating to use when using something computed like `name.length` --- src/io.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/io.ts b/src/io.ts index 9e817b73..92abbe48 100644 --- a/src/io.ts +++ b/src/io.ts @@ -66,16 +66,10 @@ export type EpochInput = // AO/IO Contract export type AoBalances = Record; -const nameLengthArray = [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -] as const; -const leaseLengthArray = [1, 2, 3, 4, 5] as const; export type AoRegistrationFees = Record< - (typeof nameLengthArray)[number], + number, { - lease: Record<(typeof leaseLengthArray)[number], number>; + lease: Record; permabuy: number; } >;