Skip to content

Commit a9e917a

Browse files
committed
refactor: avoid wait positional assertion
1 parent 091b835 commit a9e917a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/commands/cli-grammar/capture.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ function readWaitOptionsFromPositionals(
116116
}
117117

118118
export function parseWaitPositionals(args: string[]): WaitParsed | null {
119-
if (args.length === 0) return null;
120-
const firstArg = args[0]!;
119+
const firstArg = args[0];
120+
if (firstArg === undefined) return null;
121121
const sleepMs = parseTimeout(firstArg);
122122
if (sleepMs !== null) return { kind: 'sleep', durationMs: sleepMs };
123123
const timeoutMs = parseTimeout(args[args.length - 1]);

0 commit comments

Comments
 (0)