File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
import type * as BabelTypesNamespace from "@babel/types"
2
- import {
2
+ import type {
3
3
Expression ,
4
4
Identifier ,
5
5
Node ,
6
6
ObjectExpression ,
7
7
ObjectProperty ,
8
- isObjectExpression ,
9
8
} from "@babel/types"
10
9
import type { PluginObj , PluginPass , NodePath } from "@babel/core"
11
10
import type { Hub } from "@babel/traverse"
@@ -161,7 +160,7 @@ function extractFromObjectExpression(
161
160
; ( exp . properties as ObjectProperty [ ] ) . forEach ( ( { key, value } , i ) => {
162
161
const name = ( key as Identifier ) . name
163
162
164
- if ( name === "values" && isObjectExpression ( value ) ) {
163
+ if ( name === "values" && t . isObjectExpression ( value ) ) {
165
164
props . placeholders = valuesObjectExpressionToPlaceholdersRecord (
166
165
t ,
167
166
value ,
@@ -274,7 +273,7 @@ export default function ({ types: t }: { types: BabelTypes }): PluginObj {
274
273
if (
275
274
key === "values" &&
276
275
t . isJSXExpressionContainer ( item . value ) &&
277
- isObjectExpression ( item . value . expression )
276
+ t . isObjectExpression ( item . value . expression )
278
277
) {
279
278
acc . placeholders = valuesObjectExpressionToPlaceholdersRecord (
280
279
t ,
You can’t perform that action at this time.
0 commit comments