From 6aec6197fbd916c2930813b46b07e726803993f0 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 11 Aug 2023 19:25:17 +0530 Subject: refactor: minor refactor --- src/utils/adt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils/adt.ts') diff --git a/src/utils/adt.ts b/src/utils/adt.ts index 7234f67..78ab667 100644 --- a/src/utils/adt.ts +++ b/src/utils/adt.ts @@ -6,7 +6,7 @@ export const match = }): R => ((pattern as any)[tag.tag] || (pattern._ as any))(tag.value) export const matchString = - (key: T, pattern: { + (key: T, pattern: { [key in T | '_']?: (key: key) => R }): R => ((pattern as any)[key] || (pattern._ as any))(key) -- cgit v1.3.1