Skip to content

test(*): replace deprecated 'toMatchTypeOf' with 'toExtend'#10413

Merged
sukvvon merged 1 commit intomainfrom
test/replace-deprecated-toMatchTypeOf-with-toExtend
Apr 6, 2026
Merged

test(*): replace deprecated 'toMatchTypeOf' with 'toExtend'#10413
sukvvon merged 1 commit intomainfrom
test/replace-deprecated-toMatchTypeOf-with-toExtend

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Apr 6, 2026

🎯 Changes

  • Replace deprecated toMatchTypeOf with toExtend across all test files
  • Applied to react-query, preact-query, solid-query, and angular-query-experimental
  • toMatchTypeOf was deprecated since expect-type v1.2.0, with toExtend as the recommended replacement for assignability checks

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Tests
    • Updated type-level test assertions across multiple packages to improve type checking validation accuracy.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4dbaed68-687f-4833-91dd-c6678699e3fc

📥 Commits

Reviewing files that changed from the base of the PR and between cf82e86 and 3be2192.

📒 Files selected for processing (6)
  • packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts
  • packages/preact-query/src/__tests__/infiniteQueryOptions.test-d.tsx
  • packages/preact-query/src/__tests__/queryOptions.test-d.tsx
  • packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx
  • packages/react-query/src/__tests__/queryOptions.test-d.tsx
  • packages/solid-query/src/__tests__/infiniteQueryOptions.test-d.tsx

📝 Walkthrough

Walkthrough

Type-level assertions across multiple query packages were updated, replacing toMatchTypeOf with toExtend in type compatibility checks. The expected type shapes and test logic remain unchanged; only the assertion semantics shift from exact matching to subtype verification.

Changes

Cohort / File(s) Summary
Angular Query Experimental
packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts
Updated initialData type assertions from toMatchTypeOf to toExtend for optional function and object test cases.
Preact Query
packages/preact-query/src/__tests__/infiniteQueryOptions.test-d.tsx, packages/preact-query/src/__tests__/queryOptions.test-d.tsx
Updated type assertions for initialData from toMatchTypeOf to toExtend across infinite and regular query options tests.
React Query
packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx, packages/react-query/src/__tests__/queryOptions.test-d.tsx
Updated type assertions for initialData from toMatchTypeOf to toExtend across infinite and regular query options tests.
Solid Query
packages/solid-query/src/__tests__/infiniteQueryOptions.test-d.tsx
Updated options type assertions from toMatchTypeOf to toExtend for both defined and undefined initial data cases.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐰 The types all dance in perfect accord,
From match to extend, a gentler word—
No strict demands, just assignable ways,
Through packages six, the assertions blaze! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: replacing deprecated 'toMatchTypeOf' with 'toExtend' across test files.
Description check ✅ Passed The description follows the template structure, includes clear explanation of changes and rationale, completes relevant checklist items, and correctly marks the change as dev-only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/replace-deprecated-toMatchTypeOf-with-toExtend

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Apr 6, 2026

View your CI Pipeline Execution ↗ for commit 3be2192

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 1m 14s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-06 15:30:19 UTC

@sukvvon sukvvon self-assigned this Apr 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 6, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10413

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10413

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10413

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10413

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10413

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10413

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10413

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10413

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10413

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10413

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10413

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10413

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10413

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10413

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10413

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10413

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10413

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10413

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10413

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10413

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10413

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10413

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10413

commit: 3be2192

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

size-limit report 📦

Path Size
react full 11.98 KB (0%)
react minimal 9.01 KB (0%)

@sukvvon sukvvon merged commit f3d3eea into main Apr 6, 2026
13 of 14 checks passed
@sukvvon sukvvon deleted the test/replace-deprecated-toMatchTypeOf-with-toExtend branch April 6, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant