Skip to content

Commit 7527457

Browse files
fix(types): v2 (TanStack#626)
* enable types, update simpleQuery * update MutationState * stricter query type Co-authored-by: Michaël De Boey <info@michaeldeboey.be> * verify imports * verify import 2 * update fetchMore * move ready condition to enabled * update MutateOptions * update config * fix QueryResulltBase * remove queryKey function * remove duplicate type * update prefetch * functions are not valid queryKeys * add option to queryFn, formatting * Add dtslinting to ci test * remove deprecated variables * add types to formatting * add resetErrorBoundaries Co-authored-by: Michaël De Boey <info@michaeldeboey.be>
1 parent fd9c8a1 commit 7527457

File tree

5 files changed

+304
-279
lines changed

5 files changed

+304
-279
lines changed

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"repository": "tannerlinsley/react-query",
88
"homepage": "https://github.com/tannerlinsley/react-query#readme",
99
"main": "index.js",
10-
"_temporarily_disabled_types": "types/index.d.ts",
10+
"types": "types/index.d.ts",
1111
"module": "dist/react-query.mjs",
1212
"sideEffects": false,
1313
"scripts": {
1414
"test": "is-ci \"test:ci\" \"test:dev\"",
1515
"test:dev": "jest --watch",
16-
"test:ci": "jest",
16+
"test:ci": "jest && yarn dtslint",
1717
"test:coverage": "yarn test:ci; open coverage/lcov-report/index.html",
1818
"build": "NODE_ENV=production rollup -c",
1919
"now-build": "yarn && cd www && yarn && yarn build",
@@ -22,7 +22,7 @@
2222
"prepublishOnly": "yarn test:ci && yarn formatReadme",
2323
"release": "yarn publish",
2424
"releaseNext": "yarn publish --tag next",
25-
"format": "prettier {.,src,src/**,example/src,example/src/**}/*.{md,js,jsx,tsx,json} --write",
25+
"format": "prettier {.,src,src/**,example/src,example/src/**,types}/*.{md,js,jsx,tsx,json} --write",
2626
"formatReadme": "yarn doctoc",
2727
"doctoc": "npx doctoc --maxlevel 2 README.md",
2828
"jump2header": "npx @strdr4605/jump2header --header 'documentation' --start 'Installation' -e 2 --silent -l 2",
@@ -59,6 +59,7 @@
5959
"@rollup/plugin-replace": "^2.3.3",
6060
"@svgr/rollup": "^5.4.0",
6161
"@testing-library/react": "^10.2.1",
62+
"@types/react": "^16.9.41",
6263
"babel-eslint": "^10.1.0",
6364
"babel-jest": "^26.0.1",
6465
"babel-plugin-transform-async-to-promises": "^0.8.15",
@@ -93,6 +94,7 @@
9394
"rollup-plugin-prettier": "^2.1.0",
9495
"rollup-plugin-size": "^0.2.2",
9596
"rollup-plugin-terser": "^6.1.0",
96-
"rollup-plugin-visualizer": "^4.0.4"
97+
"rollup-plugin-visualizer": "^4.0.4",
98+
"typescript": "^3.9.5"
9799
}
98100
}

0 commit comments

Comments
 (0)