Skip to content

chore: remove explicit any and expect-error in platform and app-store…#29547

Draft
gmrnlg1971 wants to merge 2 commits into
calcom:mainfrom
gmrnlg1971:chore/strict-typescript-fixes
Draft

chore: remove explicit any and expect-error in platform and app-store…#29547
gmrnlg1971 wants to merge 2 commits into
calcom:mainfrom
gmrnlg1971:chore/strict-typescript-fixes

Conversation

@gmrnlg1971

Copy link
Copy Markdown

… packages

What does this PR do?

This PR removes remaining explicit any and @ts-expect-error declarations in packages/platform and packages/app-store.

  • Fixes #XXXX (GitHub issue number)

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings
  • My PR is too large (>500 lines or >10 files) and should be split into smaller PRs

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @gmrnlg1971! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb75a832-22fc-4497-8aaf-a901dec0df99

📥 Commits

Reviewing files that changed from the base of the PR and between 9e6deb0 and 05d2c87.

📒 Files selected for processing (3)
  • packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.ts
  • packages/platform/atoms/booker/BookerPlatformWrapper.tsx
  • packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
💤 Files with no reviewable changes (1)
  • packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/platform/atoms/booker/BookerPlatformWrapper.tsx
  • packages/platform/atoms/event-types/hooks/useEventTypeForm.ts

📝 Walkthrough

Walkthrough

This PR tightens TypeScript types across three areas: it removes an explicit any property from AxiosLikeResponseToFetchResponse, narrows the Zustand state parameter in BookerPlatformWrapper to Record<string, unknown>, and refactors useEventTypeForm to use Partial<FormValues> for default values, a typed getNestedField with runtime guards, and explicit Record<string, unknown> assignments for filtered payloads. No public API signatures changed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing explicit any types and @ts-expect-error declarations from two package directories.
Description check ✅ Passed The description is directly related to the changeset, explaining what explicit any types and @ts-expect-error declarations are being removed from which packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/platform/atoms/event-types/hooks/useEventTypeForm.ts`:
- Around line 399-404: getDirtyFields still uses a `@ts-expect-error` while
filteredPayload was refactored to avoid it; update getDirtyFields to follow the
same pattern by replacing the reduce accumulator typing hack with an explicit
accumulator cast (e.g., use {} as Record<string, unknown> in the reduce initial
value and cast the final result to the appropriate dirty-fields type) inside the
getDirtyFields function so the assignment to the typed accumulator no longer
requires `@ts-expect-error` and the code is consistent with filteredPayload.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 234251ac-08fb-4fac-a206-2853d17b3f0b

📥 Commits

Reviewing files that changed from the base of the PR and between 4026669 and 9e6deb0.

📒 Files selected for processing (3)
  • packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.ts
  • packages/platform/atoms/booker/BookerPlatformWrapper.tsx
  • packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
💤 Files with no reviewable changes (1)
  • packages/app-store/_utils/oauth/AxiosLikeResponseToFetchResponse.ts

Comment thread packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
@gmrnlg1971 gmrnlg1971 force-pushed the chore/strict-typescript-fixes branch from 9e6deb0 to 05d2c87 Compare June 12, 2026 04:52
}
> extends Response {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
body: any;

@bandhan-majumder bandhan-majumder Jun 12, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

body is removed entirely. Can u please add it back with proper type

@bandhan-majumder bandhan-majumder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can u run type check locally with type-check and attach a screenshot that everything is fine?

@bandhan-majumder bandhan-majumder marked this pull request as draft June 12, 2026 18:35
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gmrnlg1971

Copy link
Copy Markdown
Author

I've added body back with the unknown type in the latest commit. I'm currently unable to run yarn type-check locally to generate a screenshot, but the CI pipeline should verify it now. Let me know if the CI catches any conflicts with the base Response.body type!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants