Skip to content

Commit 85102e9

Browse files
committed
chore: remove type assertion in getArgsWithoutWaiterConfig
1 parent bd95b2b commit 85102e9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/transforms/v2-to-v3/apis/getArgsWithoutWaiterConfig.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import type { ObjectExpression, ObjectProperty, Property } from "jscodeshift";
2-
3-
import { OBJECT_PROPERTY_TYPE_LIST } from "../config";
1+
import type { ObjectExpression } from "jscodeshift";
42

53
export const getArgsWithoutWaiterConfig = (options: ObjectExpression): ObjectExpression => {
64
options.properties = options.properties.filter((property) => {
7-
if (!OBJECT_PROPERTY_TYPE_LIST.includes(property.type)) {
5+
if (property.type !== "Property" && property.type !== "ObjectProperty") {
86
return true;
97
}
10-
const propertyKey = (property as Property | ObjectProperty).key;
8+
const propertyKey = property.key;
119
if (propertyKey.type !== "Identifier") {
1210
return true;
1311
}

0 commit comments

Comments
 (0)