Skip to content

fix(Search, Typescript): Allow creating GSearchRequest without 'q' (but requiring 'filters')#777

Open
jbottigliero wants to merge 1 commit intomainfrom
fix-GSearchRequest-type
Open

fix(Search, Typescript): Allow creating GSearchRequest without 'q' (but requiring 'filters')#777
jbottigliero wants to merge 1 commit intomainfrom
fix-GSearchRequest-type

Conversation

@jbottigliero
Copy link
Member

@jbottigliero jbottigliero requested a review from jakeglobus March 2, 2026 18:59
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.79%. Comparing base (52863ec) to head (c4521cb).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #777   +/-   ##
=======================================
  Coverage   95.79%   95.79%           
=======================================
  Files          86       86           
  Lines        1759     1759           
  Branches      294      294           
=======================================
  Hits         1685     1685           
  Misses         73       73           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +149 to +153
// @ts-expect-error `filters` should require at least one element
const requireOneFilter: query.GSearchRequest = {
filters: [],
};
expect(requireOneFilter).toBeDefined();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what this is supposed to be testing. When is requireOneFilter expected to be undefined? Is this to produce a typescript error if GSearchRequest is changed in a way that's incompatible with having an empty filters array?

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.

2 participants