Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-query: updated QueryOptions definitions #41208

Merged
merged 4 commits into from Dec 23, 2019

Conversation

matteofrana
Copy link
Contributor

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should be present and it shouldn't have any additional or disabling of rules. Just content as { "extends": "dtslint/dt.json" }. If for reason the some rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

If removing a declaration:

  • If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #41208 diff
Batch compilation
Memory usage (MiB) 77.9 80.3 +3.1%
Type count 14829 14831 0%
Assignability cache size 18654 18652 0%
Language service
Samples taken 122 122 0%
Identifiers in tests 122 122 0%
getCompletionsAtPosition
    Mean duration (ms) 292.2 291.3 -0.3%
    Mean CV 10.8% 9.6%
    Worst duration (ms) 389.7 355.1 -8.9%
    Worst identifier param refetchQueriesOnFailure
getQuickInfoAtPosition
    Mean duration (ms) 290.9 297.5 +2.3%
    Mean CV 9.6% 9.4% -2.3%
    Worst duration (ms) 341.4 370.6 +8.5%
    Worst identifier param nested

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Dec 23, 2019
@typescript-bot typescript-bot added this to Needs Author Attention in Pull Request Status Board Dec 23, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 23, 2019

@matteofrana Thank you for submitting this PR!

🔔 @lukaszfiszer @JaceHensley - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Contributor

@matteofrana The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 23, 2019

@matteofrana The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

onError?: (err: any) => void;
onSuccess?: (data: TResult) => void;
suspense?: boolean;
initialData: any;
Copy link
Contributor

Choose a reason for hiding this comment

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

  • make initialData optional
  • it should has TResult type

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Dec 23, 2019
@typescript-bot
Copy link
Contributor

@matteofrana One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. Thank you!

@typescript-bot
Copy link
Contributor

🔔 @lukaszfiszer - Thanks for your review of this PR! Can you please look at the new code and update your review status if appropriate?

@typescript-bot typescript-bot moved this from Needs Author Attention to Check and Merge in Pull Request Status Board Dec 23, 2019
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Merge:Express labels Dec 23, 2019
@typescript-bot
Copy link
Contributor

A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@andrewbranch andrewbranch merged commit 7b2a852 into DefinitelyTyped:master Dec 23, 2019
Pull Request Status Board automation moved this from Check and Merge to Done Dec 23, 2019
@matteofrana
Copy link
Contributor Author

@lukaszfiszer Sorry, this is my first PR to this repo. I see that types aren't updated even removing and adding back the package. I think it is because I indicated version 0.3 of react-query in the header. When I set 0.3.23 Travis said "Error parsing header. Expected: foo MAJOR.MINOR (patch version not allowed)". How can types be updated? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Revision needed This PR needs code changes before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants