Skip to content

Commit 150b5f7

Browse files
jedmaotimdorr
authored andcommitted
fix TSDoc comments (reduxjs#3560)
Former-commit-id: 48de485
1 parent cc5bb53 commit 150b5f7

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

src/applyMiddleware.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ import { Reducer } from './types/reducers'
1717
* Note that each middleware will be given the `dispatch` and `getState` functions
1818
* as named arguments.
1919
*
20-
* @param {...Function} middlewares The middleware chain to be applied.
21-
* @returns {Function} A store enhancer applying the middleware.
20+
* @param middlewares The middleware chain to be applied.
21+
* @returns A store enhancer applying the middleware.
22+
*
23+
* @template Ext Dispatch signature added by a middleware.
24+
* @template S The type of the state supported by a middleware.
2225
*/
2326
export default function applyMiddleware(): StoreEnhancer
2427
export default function applyMiddleware<Ext1, S>(

src/compose.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Func3<T1, T2, T3, R> = (a1: T1, a2: T2, a3: T3, ...args: any[]) => R
99
* resulting composite function.
1010
*
1111
* @param funcs The functions to compose.
12-
* @returns R function obtained by composing the argument functions from right
12+
* @returns A function obtained by composing the argument functions from right
1313
* to left. For example, `compose(f, g, h)` is identical to doing
1414
* `(...args) => f(g(h(...args)))`.
1515
*/

src/createStore.ts.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0a0d35b8351fe8bd318d6c754b31d3ed210698d6
1+
a75fc2a304526089ddb4af859689430dc4e4b3c6

src/types/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface MiddlewareAPI<D extends Dispatch = Dispatch, S = any> {
2121
* installed.
2222
*/
2323
export interface Middleware<
24-
_DispatchExt = {}, // TODO: remove unused component
24+
_DispatchExt = {}, // TODO: remove unused component (breaking change)
2525
S = any,
2626
D extends Dispatch = Dispatch
2727
> {

src/utils/isPlainObject.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* @param {any} obj The object to inspect.
3-
* @returns {boolean} True if the argument appears to be a plain object.
2+
* @param obj The object to inspect.
3+
* @returns True if the argument appears to be a plain object.
44
*/
5-
export default function isPlainObject(obj: unknown) {
5+
export default function isPlainObject(obj: any): boolean {
66
if (typeof obj !== 'object' || obj === null) return false
77

88
let proto = obj

src/utils/warning.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
/**
22
* Prints a warning in the console if it exists.
33
*
4-
* @param {String} message The warning message.
5-
* @returns {void}
4+
* @param message The warning message.
65
*/
7-
export default function warning(message: string) {
6+
export default function warning(message: string): void {
87
/* eslint-disable no-console */
98
if (typeof console !== 'undefined' && typeof console.error === 'function') {
109
console.error(message)

0 commit comments

Comments
 (0)