Skip to content

Commit a181a5c

Browse files
committed
Format all files
1 parent 0213df5 commit a181a5c

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

docs/api/createSelector.mdx

+6-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ const draftSafeSelector = createWeakMapDraftSafeSelector(
9494
As of RTK 2.1, you can define a "pre-typed" version of `createDraftSafeSelector` that can have the type for `state` built in. This lets you set up those types once, so you don't have to repeat them each time you call `createDraftSafeSelector`.
9595

9696
```ts no-transpile
97-
const createTypedDraftSafeSelector = createDraftSafeSelector.withTypes<RootState>()
97+
const createTypedDraftSafeSelector =
98+
createDraftSafeSelector.withTypes<RootState>()
9899
```
99100

100101
Import and use the pre-typed `createTypedDraftSafeSelector` function, and it will automatically know that the `state` argument is of type `RootState`.
@@ -125,13 +126,14 @@ export interface RootState {
125126
alerts: Alert[]
126127
}
127128

128-
export const createTypedDraftSafeSelector = createDraftSafeSelector.withTypes<RootState>()
129+
export const createTypedDraftSafeSelector =
130+
createDraftSafeSelector.withTypes<RootState>()
129131

130132
const selectTodoIds = createTypedDraftSafeSelector(
131133
// Type of `state` is set to `RootState`, no need to manually set the type
132-
state => state.todos,
134+
(state) => state.todos,
133135
// ❌ Known limitation: Parameter types are not inferred in this scenario
134136
// so you will have to manually annotate them.
135-
(todos: Todo[]) => todos.map(({ id }) => id)
137+
(todos: Todo[]) => todos.map(({ id }) => id),
136138
)
137139
```

docs/tsconfig.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@
2323
"@reduxjs/toolkit": ["packages/toolkit/src/index.ts"],
2424
"@reduxjs/toolkit/query": ["packages/toolkit/src/query/index.ts"],
2525
"@reduxjs/toolkit/query/react": [
26-
"packages/toolkit/src/query/react/index.ts",
26+
"packages/toolkit/src/query/react/index.ts"
2727
],
2828
"@reduxjs/toolkit/dist/query/*": ["packages/toolkit/src/query/*"],
2929
"@virtual/*": ["docs/virtual/*"],
3030
"your-cool-library": ["docs/virtual/your-cool-library/index.ts"],
3131
"redux-logger": ["docs/virtual/redux-logger/index.ts"],
32-
"petstore-api.generated": [
33-
"docs/virtual/petstore-api.generated/index.ts",
34-
],
35-
},
36-
},
32+
"petstore-api.generated": ["docs/virtual/petstore-api.generated/index.ts"]
33+
}
34+
}
3735
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "expo/tsconfig.base",
33
"compilerOptions": {
4-
"strict": true,
5-
},
4+
"strict": true
5+
}
66
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "@react-native/typescript-config/tsconfig.json",
2+
"extends": "@react-native/typescript-config/tsconfig.json"
33
}

packages/rtk-query-codegen-openapi/test/tsconfig.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"paths": {
44
"@/*": ["./test/fixtures/*"],
5-
"@rtk-query/codegen-openapi": ["./src"],
5+
"@rtk-query/codegen-openapi": ["./src"]
66
},
77
"allowSyntheticDefaultImports": true,
88
"esModuleInterop": true,
@@ -16,6 +16,6 @@
1616
"resolveJsonModule": true,
1717
"types": ["vitest/globals", "vitest/importMeta"],
1818
"allowJs": true,
19-
"checkJs": true,
20-
},
19+
"checkJs": true
20+
}
2121
}

packages/rtk-query-codegen-openapi/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"types": ["vitest/globals", "vitest/importMeta"],
1414
"esModuleInterop": true,
1515
"skipLibCheck": true,
16-
"forceConsistentCasingInFileNames": true,
16+
"forceConsistentCasingInFileNames": true
1717
},
18-
"exclude": ["test", "lib", "vitest.config.mts"],
18+
"exclude": ["test", "lib", "vitest.config.mts"]
1919
}

packages/rtk-query-graphql-request-base-query/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
/* Advanced Options */
6969
"skipLibCheck": true /* Skip type checking of declaration files. */,
70-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */,
70+
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
7171
},
72-
"include": ["**/*.ts"],
72+
"include": ["**/*.ts"]
7373
}

packages/toolkit/tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"extends": "./tsconfig.test.json",
66
"compilerOptions": {
77
"skipLibCheck": true,
8-
"rootDir": ".",
8+
"rootDir": "."
99
},
10-
"include": ["."],
10+
"include": ["."]
1111
}

0 commit comments

Comments
 (0)