Skip to content

Conversation

@mpppk
Copy link
Collaborator

@mpppk mpppk commented Sep 30, 2024

Summary by CodeRabbit

  • New Features

    • Introduced new TypeScript types for improved query string handling, including validation and extraction of query keys.
    • Added a new type definition for URL validation in the fetch function, enhancing type safety.
  • Bug Fixes

    • Enhanced type safety in the FetchT function to ensure valid URLs and query definitions are used.
  • Tests

    • Implemented comprehensive tests for new query string types and fetch functionality to ensure robustness and adherence to specifications.

@coderabbitai
Copy link

coderabbitai bot commented Sep 30, 2024

Walkthrough

The changes introduce new TypeScript types and tests for handling query strings and validating URLs in the codebase. Key functionalities include extracting query keys, checking for missing or excessive keys, and validating URL structures against defined query parameters. The updates enhance type safety and testing coverage, particularly for the fetch functionality, ensuring adherence to API specifications.

Changes

Files Change Summary
src/core/query-string.t-test.ts Introduces type tests for utility types related to query strings, including ToQueryUnion, HasMissingQuery, HasExcessiveQuery, NonOptionalKeys, and IsValidQuery. Each test case uses Expect and Equal types for assertions.
src/core/query-string.ts Adds several new TypeScript types for query string handling, including ExtractQuery, ToQueryUnion, HasMissingQuery, HasExcessiveQuery, NonOptionalKeys, and IsValidQuery. These types validate query strings and their keys against defined structures.
src/fetch/index.t-test.ts Introduces additional test cases for the fetch function, validating behavior with various parameter scenarios, ensuring proper error handling and adherence to API specifications.
src/fetch/index.ts Adds the IsValidUrl type to validate URLs based on query definitions and modifies the FetchT type to enforce stricter input checks using this new validation.

Possibly related PRs

Poem

🐰 In the garden of code, we hop and play,
With query strings dancing, come what may.
Types and tests bloom, a vibrant array,
Fetching the data, in a safe ballet.
So let’s celebrate, with joy and cheer,
For every new type brings us near! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Outside diff range and nitpick comments (5)
src/core/query-string.t-test.ts (3)

10-15: LGTM: ToQueryUnionCase covers essential scenarios.

The test cases for ToQueryUnion are comprehensive, covering single parameter, multiple parameters, and repeated parameters scenarios. The expected results are correct based on the input query strings.

Consider adding a test case for an empty query string to ensure it's handled correctly:

Expect<Equal<ToQueryUnion<"">, never>>,

31-41: LGTM: HasExcessiveQueryCase covers essential scenarios.

The test cases for HasExcessiveQuery are well-structured and cover important scenarios, including:

  • Single properties
  • Multiple properties
  • Optional properties
  • Union types

The expected results are correct based on the input types, ensuring that the HasExcessiveQuery type accurately detects excessive query keys.

Consider adding a test case for an empty object type to ensure it's handled correctly:

Expect<Equal<HasExcessiveQuery<{}, "a">, true>>,

51-70: LGTM: IsValidQueryCase thoroughly tests various scenarios.

The test cases for IsValidQuery are comprehensive and cover a wide range of scenarios, including:

  • Valid queries
  • Missing queries
  • Excessive queries
  • Combinations of required and optional properties

The expected results correctly include both boolean values and error messages, ensuring that the IsValidQuery type accurately validates queries against object types.

Consider refactoring the error messages to be more specific. Instead of "E: maybe missing query: a", it could be "Error: Missing required query parameter: a". This would make the error messages more informative and easier to understand. Here's an example of how you could modify one of the test cases:

Expect<
  Equal<
    IsValidQuery<{ a: string }, "b">,
    "Error: Missing required query parameter: a"
  >
>,
src/fetch/index.t-test.ts (1)

244-248: LGTM with a suggestion: Consider allowing flexible query parameter order.

This test case correctly validates that the current implementation throws an error when query parameters are in a different order. However, in real-world scenarios, the order of query parameters typically shouldn't matter.

Consider modifying the implementation to allow for flexible ordering of query parameters, which would make the API more robust and user-friendly.

If you decide to allow flexible ordering, you might want to update this test case to ensure that different orders are accepted:

f(`/api/projects/projectA/workflow/packages/list?a=b&state=true`, {
  headers: { Cookie: "a=b" },
});
src/fetch/index.ts (1)

114-114: Remove unused commented-out code

The commented-out type ValidUrlAndQuery appears to be unused. Removing it helps keep the codebase clean and maintainable.

Apply this diff to remove the commented-out code:

- // type ValidUrlAndQuery<Query extends string> = Query extends `${string}?${string}`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9ccde04 and c35a2f5.

📒 Files selected for processing (4)
  • src/core/query-string.t-test.ts (1 hunks)
  • src/core/query-string.ts (1 hunks)
  • src/fetch/index.t-test.ts (2 hunks)
  • src/fetch/index.ts (3 hunks)
🧰 Additional context used
🪛 Biome
src/fetch/index.ts

[error] 31-31: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

🔇 Additional comments (9)
src/core/query-string.t-test.ts (4)

1-8: LGTM: Import statements are correct and necessary.

The import statements are well-structured and import all the necessary types for the tests. No unused imports are present.


17-29: LGTM: HasMissingQueryCase thoroughly tests various scenarios.

The test cases for HasMissingQuery are comprehensive and cover a wide range of scenarios, including:

  • Required and optional properties
  • Never type
  • Union types
  • Various combinations of object types and query keys

The expected results are correct based on the input types, ensuring that the HasMissingQuery type accurately detects missing required keys.


43-49: LGTM: NonOptionalKeysCase effectively tests various scenarios.

The test cases for NonOptionalKeys are concise yet comprehensive, covering:

  • Objects with only required properties
  • Objects with only optional properties
  • Objects with a mix of required and optional properties

The expected results are correct based on the input types, ensuring that the NonOptionalKeys type accurately extracts non-optional keys from object types.


1-70: Overall, excellent test coverage for query string utility types.

This file provides comprehensive type tests for the query string utility types, covering a wide range of scenarios and edge cases. The test cases are well-structured and ensure robust type checking for:

  • ToQueryUnion
  • HasMissingQuery
  • HasExcessiveQuery
  • NonOptionalKeys
  • IsValidQuery

The use of eslint-disable comments is appropriate to prevent unused variable warnings for these type tests.

Some minor suggestions for improvement have been made in previous comments, but these are not critical issues. The overall quality of the tests is high, providing confidence in the correctness of the query string utility types.

src/fetch/index.t-test.ts (2)

232-237: LGTM: Well-structured test case for missing query parameter.

This test case effectively validates that an error is thrown when a required query parameter is not provided. It enhances the robustness of the API wrapper by ensuring proper parameter validation.


238-243: LGTM: Comprehensive test case for undefined query parameters.

This test case effectively validates that an error is thrown when an undefined query parameter is included in the request. It strengthens the API wrapper by ensuring strict adherence to the defined parameter schema.

src/core/query-string.ts (2)

42-43: Functionality of ExtractQuery is correct

The ExtractQuery type correctly extracts the query part from a URL string.


65-67: Implementation of NonOptionalKeys is correct

The NonOptionalKeys type accurately extracts non-optional keys from a type.

src/fetch/index.ts (1)

104-104: Enhance type safety in 'FetchT' with 'IsValidUrl'

Updating the input parameter to use IsValidUrl improves type safety by ensuring that only valid URLs matching the expected query parameters are accepted.

Comment on lines 23 to 31
(async () => {
const f = fetch as FetchT<"", Spec>;
{
// TODO: 今はinitの省略ができないが、できるようにしたい
// methodを省略した場合はgetとして扱う
const res = await f("/users", {});
(await res.json()).prop;
}
})();
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove duplicated code block.

This code block is an exact duplicate of the one immediately preceding it. Removing this redundant segment will improve code maintainability without affecting test coverage.

Please remove the following lines:

-  (async () => {
-    const f = fetch as FetchT<"", Spec>;
-    {
-      // TODO: 今はinitの省略ができないが、できるようにしたい
-      // methodを省略した場合はgetとして扱う
-      const res = await f("/users", {});
-      (await res.json()).prop;
-    }
-  })();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(async () => {
const f = fetch as FetchT<"", Spec>;
{
// TODO: 今はinitの省略ができないが、できるようにしたい
// methodを省略した場合はgetとして扱う
const res = await f("/users", {});
(await res.json()).prop;
}
})();

Comment on lines +69 to +77
export type IsValidQuery<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, any>,
QueryKeys extends string,
> = [HasMissingQuery<QueryDef, QueryKeys>] extends [true]
? `E: maybe missing query: ${keyof QueryDef & string}`
: [HasExcessiveQuery<QueryDef, QueryKeys>] extends [true]
? `E: maybe excessive query: ${QueryKeys}`
: true;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance error messages in IsValidQuery

The current error messages in IsValidQuery may not clearly indicate which query parameters are missing or excessive.

Consider modifying the implementation to specify the exact keys that are missing or excessive to improve developer experience.

Possible approach:

Implement utility types to compute the specific missing or excessive keys:

type MissingKeys<QueryDef, QueryKeys> = Exclude<NonOptionalKeys<QueryDef>, QueryKeys>;
type ExcessiveKeys<QueryDef, QueryKeys> = Exclude<QueryKeys, keyof QueryDef>;

Then adjust IsValidQuery to use these types in the error messages:

export type IsValidQuery<
  QueryDef extends Record<string, unknown>,
  QueryKeys extends string,
> = MissingKeys<QueryDef, QueryKeys> extends never
  ? ExcessiveKeys<QueryDef, QueryKeys> extends never
    ? true
    : `E: excessive query keys: ${ExcessiveKeys<QueryDef, QueryKeys>}`
  : `E: missing query keys: ${MissingKeys<QueryDef, QueryKeys>}`;

Comment on lines +59 to +62
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, any>,
QueryKeys extends string,
// no union distribution
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid using any in type definitions

Using any in type definitions can reduce type safety. Consider replacing any with unknown or a more specific type.

Suggested change:

- QueryDef extends Record<string, any>,
+ QueryDef extends Record<string, unknown>,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, any>,
QueryKeys extends string,
// no union distribution
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, unknown>,
QueryKeys extends string,
// no union distribution

Comment on lines +53 to +56
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, any>,
QueryKeys extends string,
> = NonOptionalKeys<QueryDef> extends QueryKeys ? false : true;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid using any in type definitions

Using any in type definitions reduces type safety. Consider replacing any with unknown or a more specific type to enhance type checking.

Suggested change:

- QueryDef extends Record<string, any>,
+ QueryDef extends Record<string, unknown>,

Alternatively, define a more precise type for QueryDef if possible.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, any>,
QueryKeys extends string,
> = NonOptionalKeys<QueryDef> extends QueryKeys ? false : true;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, unknown>,
QueryKeys extends string,
> = NonOptionalKeys<QueryDef> extends QueryKeys ? false : true;

Comment on lines +45 to +50
export type ToQueryUnion<Query extends string> =
Query extends `${infer Key}=${string}&${infer Rest}`
? Key | ToQueryUnion<Rest>
: Query extends `${infer Key}=${string}`
? Key
: `invalid query: ${Query}`;
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider refining the error handling in ToQueryUnion

Currently, if the query string does not match the expected patterns, the ToQueryUnion type returns a string literal of the format invalid query: ${Query}. This may complicate type comparisons and error handling.

Consider returning never or a custom error type to improve type safety and clarity.

Suggested change:

export type ToQueryUnion<Query extends string> =
  Query extends `${infer Key}=${string}&${infer Rest}`
    ? Key | ToQueryUnion<Rest>
  : Query extends `${infer Key}=${string}`
    ? Key
- : `invalid query: ${Query}`;
+ : never;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export type ToQueryUnion<Query extends string> =
Query extends `${infer Key}=${string}&${infer Rest}`
? Key | ToQueryUnion<Rest>
: Query extends `${infer Key}=${string}`
? Key
: `invalid query: ${Query}`;
export type ToQueryUnion<Query extends string> =
Query extends `${infer Key}=${string}&${infer Rest}`
? Key | ToQueryUnion<Rest>
: Query extends `${infer Key}=${string}`
? Key
: never;


type IsValidUrl<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, any> | undefined,
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid using 'any' types and unnecessary ESLint disable comments

Relying on any reduces type safety and can introduce potential bugs. Additionally, disabling ESLint rules suppresses valuable warnings. Consider defining more specific types and removing the ESLint disable comments.

For example:

  • Replace any with more precise types where possible.
  • Remove the eslint-disable-next-line comments after addressing the underlying issues.

Also applies to: 31-31

QueryKeys extends string = Query extends string ? ToQueryUnion<Query> : never,
> = IsValidQuery<
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
QueryDef extends Record<string, any> ? QueryDef : {},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Use 'Record<string, never>' instead of '{}' as a type

Using {} as a type can lead to unintended behaviors since it represents any non-nullable value. For an empty object type, Record<string, never> provides better type safety and clarity.

Apply this diff to fix the issue:

-  QueryDef extends Record<string, any> ? QueryDef : {},
+  QueryDef extends Record<string, any> ? QueryDef : Record<string, never>,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
QueryDef extends Record<string, any> ? QueryDef : {},
QueryDef extends Record<string, any> ? QueryDef : Record<string, never>,
🧰 Tools
🪛 Biome

[error] 31-31: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
src/fetch/index.ts (1)

Line range hint 1-110: Summary: Improved URL validation with enhanced type safety.

The changes in this file significantly improve type safety for URL handling:

  1. The new IsValidUrl type provides a robust mechanism for validating URLs against query definitions.
  2. The updated FetchT type now ensures that only valid URLs are accepted as input.

These improvements will help catch potential errors at compile-time, reducing the likelihood of runtime issues related to invalid URLs.

To further enhance the code:

  1. Consider addressing the ESLint disable comments by using more specific types.
  2. Replace {} with Record<string, never> for better type safety when representing empty objects.

Overall, these changes represent a positive step towards more robust and type-safe code.

🧰 Tools
🪛 Biome

[error] 31-31: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c35a2f5 and 44d5c11.

📒 Files selected for processing (2)
  • src/fetch/index.t-test.ts (1 hunks)
  • src/fetch/index.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/fetch/index.t-test.ts
🧰 Additional context used
🪛 Biome
src/fetch/index.ts

[error] 31-31: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

🔇 Additional comments (2)
src/fetch/index.ts (2)

16-18: LGTM: New imports added for URL validation.

The new imports (ExtractQuery, IsValidQuery, and ToQueryUnion) are appropriate for implementing the IsValidUrl type. They enhance the type-checking capabilities for URL validation.


102-102: LGTM: Improved type safety for input URL.

The update to the input parameter type in FetchT is a significant improvement:

input: IsValidUrl<Query, Input> extends true ? Input : never,

This change ensures that only valid URLs (according to the query definition) are accepted as input. It leverages the new IsValidUrl type to provide compile-time checks, which will help prevent runtime errors related to invalid URLs.

Comment on lines +23 to +33
type IsValidUrl<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, unknown> | undefined,
Url extends string,
Query extends string | undefined = ExtractQuery<Url>,
QueryKeys extends string = Query extends string ? ToQueryUnion<Query> : never,
> = IsValidQuery<
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
QueryDef extends Record<string, any> ? QueryDef : {},
QueryKeys
>;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Improve type safety and remove ESLint disable comments.

The IsValidUrl type is a good addition for enhancing URL validation. However, there are a few improvements to be made:

  1. Remove the ESLint disable comments and address the underlying issues.
  2. Replace {} with a more specific type.

Apply this diff to improve type safety:

 type IsValidUrl<
-  // eslint-disable-next-line @typescript-eslint/no-explicit-any
   QueryDef extends Record<string, unknown> | undefined,
   Url extends string,
   Query extends string | undefined = ExtractQuery<Url>,
   QueryKeys extends string = Query extends string ? ToQueryUnion<Query> : never,
 > = IsValidQuery<
-  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
-  QueryDef extends Record<string, any> ? QueryDef : {},
+  QueryDef extends Record<string, unknown> ? QueryDef : Record<string, never>,
   QueryKeys
 >;

This change removes the need for ESLint disable comments and improves type safety by using Record<string, never> instead of {} for an empty object type.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type IsValidUrl<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
QueryDef extends Record<string, unknown> | undefined,
Url extends string,
Query extends string | undefined = ExtractQuery<Url>,
QueryKeys extends string = Query extends string ? ToQueryUnion<Query> : never,
> = IsValidQuery<
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
QueryDef extends Record<string, any> ? QueryDef : {},
QueryKeys
>;
type IsValidUrl<
QueryDef extends Record<string, unknown> | undefined,
Url extends string,
Query extends string | undefined = ExtractQuery<Url>,
QueryKeys extends string = Query extends string ? ToQueryUnion<Query> : never,
> = IsValidQuery<
QueryDef extends Record<string, unknown> ? QueryDef : Record<string, never>,
QueryKeys
>;
🧰 Tools
🪛 Biome

[error] 31-31: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

@mpppk mpppk merged commit e0ea099 into main Sep 30, 2024
@mpppk mpppk deleted the is-valid-url branch September 30, 2024 05:55
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