You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The types are generated with correct string interpolation—in this case _type == "page"
Screenshots
Which versions of Sanity are you using?
❯ npx sanity versions
@sanity/cli (global) 3.69.0 (latest: 3.70.0)
@sanity/code-input 5.1.2 (up to date)
@sanity/eslint-config-studio 5.0.1 (up to date)
@sanity/icons 3.5.7 (up to date)
@sanity/image-url 1.1.0 (up to date)
@sanity/presentation 1.21.3 (up to date)
@sanity/types 3.69.0 (latest: 3.70.0)
@sanity/ui 2.11.2 (up to date)
@sanity/vision 3.69.0 (latest: 3.70.0)
sanity 3.69.0 (latest: 3.70.0)
What operating system are you using?
MacOS Sonoma 14.6.1 (23G93)
Which versions of Node.js / npm are you running?
❯ npm -v && node -v
10.8.2
v20.17.0
The text was updated successfully, but these errors were encountered:
Jamiewarb
changed the title
Typegen failing on queries that use an object or enum in string interpolationUnsupported expression type: MemberExpression - Typegen failing on queries that use an object or enum in string interpolation
Jan 16, 2025
Describe the bug
When generating types using
npx sanity typegen generate
, generation will fail for queries that access an object or enum via string interpolation.It fails with error
Unsupported expression type: MemberExpression in file.ts:5:60 in "file.ts"
To Reproduce
Run
npx sanity typegen generation
Observe the error:
Unsupported expression type: MemberExpression in file.ts:5:55 in "file.ts"
Expected behavior
The types are generated with correct string interpolation—in this case
_type == "page"
Screenshots
Which versions of Sanity are you using?
What operating system are you using?
MacOS Sonoma 14.6.1 (23G93)
Which versions of Node.js / npm are you running?
The text was updated successfully, but these errors were encountered: