Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why keeping unused? #804

Open
5 tasks done
Barbapapazes opened this issue Oct 13, 2024 · 1 comment
Open
5 tasks done

Why keeping unused? #804

Barbapapazes opened this issue Oct 13, 2024 · 1 comment

Comments

@Barbapapazes
Copy link

Describe the bug

Hello,

This is not really a bug (but I think it is a strange behavior).

I was wondering why, when a component is remove, (which trigger the unlink on the wathcer), it is not remove from the component.d.ts file?

I was suspecting a but I see this test,

it('writeDeclaration - keep unused', async () => {
, so I imagine it's not a bug but I'm not understanding why.

Reproduction

/

System Info

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M3
    Memory: 93.94 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
    pnpm: 9.9.0 - ~/.nvm/versions/node/v20.17.0/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.91
    Safari: 17.6

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@VividLemon
Copy link
Contributor

#611

The issue is that the components in dts are lazily loaded. The plugin doesn't scan the entire app and add them all at once, they get added when they're first loaded. But I recall having an issue where they were getting removed, and then suddenly my intellisense was gone, even though the component wasn't removed from the app. It's just dts files, it doesn't have an impact on anything, so its best to just keep the file continuously growing, or at most shaken off during build runs imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants