Skip to content

Commit ee1732f

Browse files
authored
chore(ts): Better generics for getDynamicText function (#14415)
1 parent 3718c39 commit ee1732f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sentry/static/sentry/app/utils/getDynamicText.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
// Return a specified "fixed" string when we are in a testing environment
44
// (more specifically in a PERCY env (e.g. CI))
5-
export default function getDynamicText({
5+
export default function getDynamicText<Value, Fixed = Value>({
66
value,
77
fixed,
88
}: {
9-
value: React.ReactNode;
10-
fixed: string;
11-
}): React.ReactNode {
9+
value: Value;
10+
fixed: Fixed;
11+
}): Value | Fixed {
1212
return process.env.IS_PERCY ? fixed : value;
1313
}

0 commit comments

Comments
 (0)