Skip to content

fix: resolve CI type-check errors (lodash types, Buffer→Uint8Array)#32

Merged
mmcky merged 1 commit intomainfrom
fix/ci-type-errors
Feb 25, 2026
Merged

fix: resolve CI type-check errors (lodash types, Buffer→Uint8Array)#32
mmcky merged 1 commit intomainfrom
fix/ci-type-errors

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Feb 25, 2026

Fix CI Type-Check Errors

The new CI pipeline (PR #31) correctly caught 3 pre-existing TypeScript errors that were previously invisible (no CI existed before).

Fixes

  1. @types/lodash.throttle — Added as devDependency. @myst-theme/site ships .tsx source files (not compiled .d.ts), so TypeScript follows imports into the package and needs this type declaration.

  2. BufferUint8Array in [objects.inv].tsx and [favicon.ico].tsx — Newer @types/node no longer allows Buffer as a BodyInit argument to new Response(). Wrapping with new Uint8Array() is the correct fix since Uint8Array satisfies BufferSource which is part of BodyInit.

Verification

Both npm run compile and npm run prod:build pass cleanly after these changes.

- Install @types/lodash.throttle (fixes missing declaration for
  @myst-theme/site upstream import)
- Convert Buffer to Uint8Array in [objects.inv].tsx and [favicon.ico].tsx
  (Buffer no longer assignable to BodyInit in newer @types/node)
@mmcky mmcky merged commit b1121e2 into main Feb 25, 2026
1 check passed
@mmcky mmcky deleted the fix/ci-type-errors branch February 25, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant