Git Product home page Git Product logo

Comments (5)

rgossiaux avatar rgossiaux commented on July 4, 2024 2

Thanks for the report! I see this as well.

This is due to the same issue as here: sveltejs/language-tools#573 The library uses a bunch of different export enum statements, and it looks like TypeScript transpilation ends up producing code that generates these warnings. The linked issue just silenced the warnings in the language tools, but that doesn't help other parts of the ecosystem like vite-plugin-svelte. It feels to me like the transpilation process needs to be fixed to not produce Svelte code that will generate a warning. I'm not sure which tool should ultimately be responsible for fixing this, so I'll poke around and see what we can do.

In the meantime, it's completely safe to ignore these; they're a false positive. Sorry for the spam!

from svelte-headlessui.

rgossiaux avatar rgossiaux commented on July 4, 2024 2

Just as an FYI to anyone following this thread--because I personally find this super annoying, especially in the REPL, so I imagine you folks do too--I submitted a PR to Svelte itself that would fix these warnings. So far the maintainer response has been positive so I'm optimistic it could land within the next few weeks. Thanks for your patience!

from svelte-headlessui.

mfilteau avatar mfilteau commented on July 4, 2024 1

Is it the same issue with these warnings?

[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/dialog/Dialog.svelte:2:11 Dialog has unused export property 'DialogStates'. If it is for external reference only, please consider using export const DialogStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/disclosure/Disclosure.svelte:3:11 Disclosure has unused export property 'DisclosureStates'. If it is for external reference only, please consider using export const DisclosureStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/listbox/Listbox.svelte:1:37 Listbox has unused export property 'ListboxStates'. If it is for external reference only, please consider using export const ListboxStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/menu/Menu.svelte:9:11 Menu has unused export property 'MenuStates'. If it is for external reference only, please consider using export const MenuStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/popover/Popover.svelte:1:37 Popover has unused export property 'PopoverStates'. If it is for external reference only, please consider using export const PopoverStates
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/internal/StackContextProvider.svelte:1:37 StackContextProvider has unused export property 'StackMessage'. If it is for external reference only, please consider using export const StackMessage
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/utils/Render.svelte:21:11 Render has unused export property 'RenderStrategy'. If it is for external reference only, please consider using export const RenderStrategy
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/utils/Render.svelte:3:11 Render has unused export property 'Features'. If it is for external reference only, please consider using export const Features
[vite-plugin-svelte] ./node_modules/@rgossiaux/svelte-headlessui/components/transitions/common.svelte:4:11 Common has unused export property 'TreeStates'. If it is for external reference only, please consider using export const TreeStates

from svelte-headlessui.

rgossiaux avatar rgossiaux commented on July 4, 2024 1

After a long wait, Svelte 3.46.5 was just released today, which contains a fix for this issue that I submitted myself.

You can upgrade Svelte to 3.46.5 and these warnings should finally go away!

from svelte-headlessui.

vhscom avatar vhscom commented on July 4, 2024

I saw two members already looked at the PR. Hopefully a maintainer will have a chance to get to it soon. Thanks for tackling that issue, @rgossiaux, as it creeps up in playwrite runs too and I'm about to >/dev/null 😆

from svelte-headlessui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.