Skip to content

Commit 217c7e6

Browse files
author
Raylan LIN
committed
fix: type annotation for EPIPE handler (TS2339) + simplify CI
- main.ts: add NodeJS.ErrnoException type to stdout error handler (fixes TS2339 from base branch merge) - ci.yml: use npx tsc directly instead of bun run typecheck
1 parent 1434c30 commit 217c7e6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- uses: actions/checkout@v4
99
- uses: oven-sh/setup-bun@v2
1010
- run: bun install
11-
- run: bun run typecheck 2>&1 || (npx tsc --noEmit 2>&1; echo "EXIT: $?"; exit 1)
11+
- run: npx tsc --noEmit
1212
- run: bun test
1313
- name: Smoke test
1414
run: |

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ process.on('SIGINT', () => {
1818
});
1919

2020
// Handle stdout EPIPE gracefully (e.g., piped to `mpv` that exits early)
21-
process.stdout.on('error', (e) => {
21+
process.stdout.on('error', (e: NodeJS.ErrnoException) => {
2222
if (e.code === 'EPIPE') process.exit(0);
2323
else throw e;
2424
});

0 commit comments

Comments
 (0)