fedorovvvv / svelte-floating-ui

Svelte✨ Floating UI 🎈
MIT License
151 stars 8 forks source link

TypeScript error on floating-ui >= 1.6.0 #15

Open Cluster2a opened 10 months ago

Cluster2a commented 10 months ago

Hey, there seems to be a type mismatch, when upgrading dependencies to:

https://github.com/fedorovvvv/svelte-floating-ui/blob/a1f7bee81ed60a2dcbe143dfc4b0cefd48cde22a/src/lib/index.ts#L40C13-L40C72

Argument of type 'ComputeConfig' is not assignable to parameter of type 'Partial<{ placement?: Placement; strategy?: Strategy; middleware?: (false | { name: string; options?: any; fn: (state: { platform: Platform; placement: Placement; ... 6 more ...; elements: Elements; }) => Promisable<...>; })[]; platform?: Platform; }>'.
  Types of property 'platform' are incompatible.

Are there any plans to bump the dependencies?

stayradiated commented 6 months ago

Looks like we need to change the import of ComputePositionConfig from @floating-ui/core to @floating-ui/dom.