Skip to content

fix(fibRoute): add explicit type for fibN to resolve ESLint type errors#4

Merged
DeepakReddyG merged 1 commit intomainfrom
fix-fibRoute-unsafe-assignment
Aug 24, 2025
Merged

fix(fibRoute): add explicit type for fibN to resolve ESLint type errors#4
DeepakReddyG merged 1 commit intomainfrom
fix-fibRoute-unsafe-assignment

Conversation

@DeepakReddyG
Copy link
Copy Markdown
Owner

Changes

  • Added fibN: number to ensure the fibonacci call in fibRoute.ts is type-safe, fixing @typescript-eslint/no-unsafe-assignment.

Testing

  • Ran npm run lint to confirm no ESLint errors in fibRoute.ts after fixing fib.ts.
  • Tested the endpoint with GET /5 (got fibonacci(5) is 8), GET /abc (got fibonacci(undefined) is undefined), and GET /-1 (got fibonacci(-1) is undefined) to verify it works.

Fixes #2

@DeepakReddyG DeepakReddyG self-assigned this Aug 24, 2025
@DeepakReddyG DeepakReddyG merged commit d47ee7c into main Aug 24, 2025
1 check failed
@DeepakReddyG DeepakReddyG deleted the fix-fibRoute-unsafe-assignment branch August 24, 2025 00:23
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.

Type Safety Issue in fibRoute.ts: Fix Unsafe Assignment from fibonacci Call

1 participant