Skip to content

Commit a7d11e5

Browse files
committed
[clean] Throw error if second arg of mapState is a function.
1 parent 3c79c80 commit a7d11e5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/converters/options/computedConverter.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ export const computedConverter = (
9696

9797
const namespaceText = namespace.text;
9898

99+
if (ts.isFunctionExpression(mapObject)) {
100+
throw new Error(
101+
"Function as the argument of mapState or mapGetters is not currently supported"
102+
);
103+
}
104+
99105
if (ts.isArrayLiteralExpression(mapObject)) {
100106
return mapArrayConverter(mapName, namespaceText, mapObject);
101107
}

0 commit comments

Comments
 (0)