diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-08-11 19:25:17 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-08-11 19:25:17 +0530 |
| commit | 6aec6197fbd916c2930813b46b07e726803993f0 (patch) | |
| tree | 2166acaa80cc3ae358b4abb4e20d51546f2438af /src/utils | |
| parent | 952256ae8bf5514a246db8f33bef207f5747b138 (diff) | |
| download | css-everything-6aec6197fbd916c2930813b46b07e726803993f0.tar.gz css-everything-6aec6197fbd916c2930813b46b07e726803993f0.zip | |
refactor: minor refactor
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/adt.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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 = - <R, T extends string>(key: T, pattern: { + <R, T extends string = string>(key: T, pattern: { [key in T | '_']?: (key: key) => R }): R => ((pattern as any)[key] || (pattern._ as any))(key) |
