(value: unknown)
| 198 | } |
| 199 | |
| 200 | function gitRefsParam(value: unknown): OpenADEActionEventCreateRequest["gitRefsBefore"] { |
| 201 | if (value === undefined) return undefined |
| 202 | const record = asRecord(value) |
| 203 | if (typeof record.sha !== "string" || record.sha.length < 1) throw new Error("gitRefsBefore.sha is invalid") |
| 204 | return { |
| 205 | sha: record.sha, |
| 206 | branch: typeof record.branch === "string" ? record.branch : undefined, |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | function unrefTimer(timer: ReturnType<typeof setTimeout>): void { |
| 211 | ;(timer as { unref?: () => void }).unref?.() |
no test coverage detected