Skip to content

Commit

Permalink
[TS-prototype]: convert verifySubselectors to TS #1737 (#1748)
Browse files Browse the repository at this point in the history
  • Loading branch information
FaberVitale committed Jun 30, 2021
1 parent c3764dd commit a5c4916
Showing 1 changed file with 10 additions and 6 deletions.
@@ -1,6 +1,10 @@
import warning from '../utils/warning'

function verify(selector, methodName, displayName) {
function verify(
selector: unknown,
methodName: string,
displayName: string
): void {
if (!selector) {
throw new Error(`Unexpected value for ${methodName} in ${displayName}.`)
} else if (
Expand All @@ -16,11 +20,11 @@ function verify(selector, methodName, displayName) {
}

export default function verifySubselectors(
mapStateToProps,
mapDispatchToProps,
mergeProps,
displayName
) {
mapStateToProps: unknown,
mapDispatchToProps: unknown,
mergeProps: unknown,
displayName: string
): void {
verify(mapStateToProps, 'mapStateToProps', displayName)
verify(mapDispatchToProps, 'mapDispatchToProps', displayName)
verify(mergeProps, 'mergeProps', displayName)
Expand Down

0 comments on commit a5c4916

Please sign in to comment.