Skip to content

Commit be7ae9f

Browse files
ssutarpzuraq
authored andcommitted
Add support for query params (#22)
Issue: #20
1 parent f225aa3 commit be7ae9f

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

transforms/ember-object/__testfixtures__/basic.input.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const Foo = Test.extend(MyMixin, {
99
boolProp: true,
1010
numProp: 123,
1111
[MY_VAL]: "val",
12+
queryParams: {},
1213

1314
/**
1415
* Method comments

transforms/ember-object/__testfixtures__/basic.output.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Foo extends Test.extend(MyMixin) {
1010
boolProp = true;
1111
numProp = 123;
1212
[MY_VAL] = "val";
13+
queryParams = {};
1314

1415
/**
1516
* Method comments

transforms/helpers/validation-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function hasValidProps(
4040
unsupportedPropNames.includes(instanceProp.name) ||
4141
(!classFields && instanceProp.type === "Literal") ||
4242
(instanceProp.type === "ObjectExpression" &&
43-
instanceProp.name !== "actions") ||
43+
!["actions", "queryParams"].includes(instanceProp.name)) ||
4444
(instanceProp.isCallExpression && !instanceProp.hasDecorators)
4545
) {
4646
return false;

0 commit comments

Comments
 (0)