Skip to content

[BUG] tsc --noEmit fails on main with 42 errors — unclosed interface blocks every commit #801

Description

@SakethSumanBathini

Summary

npx tsc --noEmit fails on clean main @ a5b5a9e. Because husky runs it pre-commit, no commit can be made without --no-verify.

The first error stops the compiler outright:

src/types/index.ts(60,1): error TS1131: Property or signature expected.

Cause

OrgStats is never closed — the next interface starts inside it:

export interface OrgStats {
  prsCount?: number;
  issuesCount?: number;
  commitsCount?: number;
  reviewsCount?: number;      // <- line 59, no closing brace
export interface GistItem {   // <- line 60

Introduced by dd1672b ("Merge branch 'main' into feat/Organization-Specific-Contribution-Stats") — a merge that dropped the brace where OrgStats and GistItem (from #793) met.

It's worse underneath

Adding the brace lets the compiler continue, and it then reports 42 errors across 10 files:

src/app/api/[username]/story/route.ts   'fetchProfileSnapshot' is not exported (did you mean 'getProfileSnapshot'?)
src/app/api/[username]/view/route.ts    'checkRateLimit' is not exported from '@/lib/rate-limit'
src/app/explore/page.tsx                Cannot find name 'describeFilters'  (x2)
src/components/profile/GistList.tsx
src/components/profile/ProfileReposSection.tsx    GitHubRepo missing stars, forks, languageColor, url
src/components/profile/ProfileView.tsx
src/lib/__tests__/open-source-story.test.ts
src/lib/__tests__/org-stats.test.ts

Several look like the same merge losing or renaming exports rather than independent bugs.

Impact

Every contributor needs --no-verify to commit, which defeats the hook — and a hook people routinely bypass stops catching anything, including the next unclosed brace.

Suggested fix

The one-line brace first, as its own PR, since it unblocks the compiler and lets everyone see the rest. The remaining 41 are probably best triaged by whoever merged the two features involved, since most look like merge fallout rather than genuine type mistakes.

Happy to send the brace fix immediately if that's useful.

Metadata

Metadata

Labels

bugSomething is not working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions