Skip to content

Commit 202718d

Browse files
committed
fix: add Change type parameter to flatMap for typecheck
1 parent 686de9d commit 202718d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

apps/webapp/app/routes/admin.feature-flags.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,12 @@ function ConfirmDialog({
364364
}) {
365365
const allKeys = Object.keys(controlTypes).sort();
366366

367-
const changes = allKeys.flatMap((key) => {
367+
type Change =
368+
| { key: string; type: "added"; newVal: string }
369+
| { key: string; type: "removed"; oldVal: string }
370+
| { key: string; type: "changed"; oldVal: string; newVal: string };
371+
372+
const changes = allKeys.flatMap<Change>((key) => {
368373
const wasSet = key in initialValues;
369374
const isSet = key in newValues;
370375
const oldVal = initialValues[key];

0 commit comments

Comments
 (0)