After updating to Sanity version 3.56.0 I am getting a typescript error when using the imageHotspot option with an array schema.
The error is as follows Object literal may only specify known properties, and 'imageHotspot' does not exist in type 'ArrayOptions<unknown>'
To Reproduce
Install latest Sanity with typescript
Install latest version of sanity plugin hotspot array
Create an array schema definition using the imageHotspot option
You should get a typescript error, if not you can npx tsc and it should output a type error.
Expected behavior
If possible an update to the package to overcome this type issue, or instructions on how to define an array schema when using this plugin to avoid the typescript errors.
Screenshots
Which versions of Sanity are you using?
@sanity/cli (global) 3.56.0 (up to date)
@sanity/cli 3.56.0 (up to date)
@sanity/code-input 4.1.4 (up to date)
@sanity/color-input 3.1.1 (up to date)
@sanity/eslint-config-studio 4.0.0 (up to date)
@sanity/ui 2.8.9 (up to date)
@sanity/util 3.56.0 (up to date)
@sanity/vision 3.38.0 (latest: 3.56.0)
sanity 3.56.0 (up to date)
Describe the bug
After updating to Sanity version 3.56.0 I am getting a typescript error when using the
imageHotspot
option with an array schema.The error is as follows
Object literal may only specify known properties, and 'imageHotspot' does not exist in type 'ArrayOptions<unknown>'
To Reproduce
imageHotspot
optionnpx tsc
and it should output a type error.Expected behavior
If possible an update to the package to overcome this type issue, or instructions on how to define an array schema when using this plugin to avoid the typescript errors.
Screenshots
Which versions of Sanity are you using?
@sanity/cli (global) 3.56.0 (up to date) @sanity/cli 3.56.0 (up to date) @sanity/code-input 4.1.4 (up to date) @sanity/color-input 3.1.1 (up to date) @sanity/eslint-config-studio 4.0.0 (up to date) @sanity/ui 2.8.9 (up to date) @sanity/util 3.56.0 (up to date) @sanity/vision 3.38.0 (latest: 3.56.0) sanity 3.56.0 (up to date)
What operating system are you using?
WSL2 on Windows 11
Which versions of Node.js / npm are you running?
npm 10.8.1 node v20.16.0