sanity-io / sanity-plugin-hotspot-array

A configurable Custom Input for Arrays that will add and update items by clicking on an Image
MIT License
23 stars 8 forks source link

Type error in the Sanity version 3.56 #25

Open zarif-lh opened 2 months ago

zarif-lh commented 2 months ago

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

  1. Install latest Sanity with typescript
  2. Install latest version of sanity plugin hotspot array
  3. Create an array schema definition using the imageHotspot option
  4. 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

image image

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