Skip to content

Commit ac972a3

Browse files
CopilotJoyceZhu
andcommitted
Fix TypeScript narrowing for new scanner inputs
Co-authored-by: JoyceZhu <6251669+JoyceZhu@users.noreply.github.com>
1 parent 4f418b1 commit ac972a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/actions/find/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export default async function () {
1717
if (!['reduce', 'no-preference'].includes(reducedMotionInput)) {
1818
throw new Error("Input 'reduced_motion' must be one of: 'reduce', 'no-preference'")
1919
}
20-
reducedMotion = reducedMotionInput
20+
reducedMotion = reducedMotionInput as 'reduce' | 'no-preference'
2121
}
2222
const colorSchemeInput = core.getInput('color_scheme', {required: false})
2323
let colorScheme: 'light' | 'dark' | 'no-preference' | undefined
2424
if (colorSchemeInput) {
2525
if (!['light', 'dark', 'no-preference'].includes(colorSchemeInput)) {
2626
throw new Error("Input 'color_scheme' must be one of: 'light', 'dark', 'no-preference'")
2727
}
28-
colorScheme = colorSchemeInput
28+
colorScheme = colorSchemeInput as 'light' | 'dark' | 'no-preference'
2929
}
3030

3131
const findings = []

0 commit comments

Comments
 (0)