Skip to content

Commit a5c4916

Browse files
authored
[TS-prototype]: convert verifySubselectors to TS #1737 (#1748)
1 parent c3764dd commit a5c4916

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/connect/verifySubselectors.js src/connect/verifySubselectors.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import warning from '../utils/warning'
22

3-
function verify(selector, methodName, displayName) {
3+
function verify(
4+
selector: unknown,
5+
methodName: string,
6+
displayName: string
7+
): void {
48
if (!selector) {
59
throw new Error(`Unexpected value for ${methodName} in ${displayName}.`)
610
} else if (
@@ -16,11 +20,11 @@ function verify(selector, methodName, displayName) {
1620
}
1721

1822
export default function verifySubselectors(
19-
mapStateToProps,
20-
mapDispatchToProps,
21-
mergeProps,
22-
displayName
23-
) {
23+
mapStateToProps: unknown,
24+
mapDispatchToProps: unknown,
25+
mergeProps: unknown,
26+
displayName: string
27+
): void {
2428
verify(mapStateToProps, 'mapStateToProps', displayName)
2529
verify(mapDispatchToProps, 'mapDispatchToProps', displayName)
2630
verify(mergeProps, 'mergeProps', displayName)

0 commit comments

Comments
 (0)