Skip to content

Conversation

@jdalton
Copy link
Contributor

@jdalton jdalton commented Jan 12, 2026

Summary

Fixed TypeScript compilation errors in test file that were blocking the test suite:

  • Resolved TS4111 errors for index signature property access
  • Resolved TS18048 errors for potentially undefined value access
  • Added proper type assertions and runtime checks for discriminated union types

Changes

  • Added type assertion for fixDetail object accessed from index signature
  • Implemented explicit type guards with runtime checks
  • Defined inline type for value object with proper structure
  • Updated all property access to be type-safe

Test Plan

  • All tests pass (pnpm test)
  • TypeScript checks pass (pnpm tsc)
  • Linting passes (pnpm check --all)
  • Pre-commit hooks pass

Technical Details

The fixDetails response type uses Record<string, never> which requires proper type assertions to access nested properties. This fix maintains type safety while allowing the test to access the mock response data structure.

Fixed TypeScript errors when accessing properties from index signature types
in getRepoFixes test. The fixDetails response type uses Record<string, never>
which requires proper type assertions to access nested properties.

- Add type assertion for fixDetail object
- Add explicit type guards and runtime checks
- Define inline type for value object with proper structure
- Use type-safe access for all nested properties

This resolves TS4111 (index signature access) and TS18048 (undefined checks)
errors while maintaining runtime safety.
Updated dependencies to latest versions:
- pnpm: 10.27.0 → 10.28.0 (packageManager field)
- @socketsecurity/lib: 5.2.1 → 5.4.1
- @dotenvx/dotenvx: ^1.51.2 → ^1.51.4

Updated lockfile with new dependency versions.
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​dotenvx/​dotenvx@​1.51.2 ⏵ 1.51.49710010095 +2100
Updated@​socketsecurity/​lib@​5.2.1 ⏵ 5.4.1100100100100100

View full report

@socket-security-staging
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​dotenvx/​dotenvx@​1.51.2 ⏵ 1.51.499 +310010096 +3100
Updated@​socketsecurity/​lib@​5.2.1 ⏵ 5.4.1100100100100100

View full report

@jdalton jdalton merged commit 77a3d8f into main Jan 12, 2026
8 checks passed
@jdalton jdalton deleted the fix/test-type-errors branch January 12, 2026 22:13
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.

3 participants