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

Improve TypeScript support by allowing types to be imported #163

Open
wjhsf opened this issue Sep 25, 2024 · 0 comments
Open

Improve TypeScript support by allowing types to be imported #163

wjhsf opened this issue Sep 25, 2024 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@wjhsf
Copy link
Contributor

wjhsf commented Sep 25, 2024

no-disallowed-lwc-imports restricts the APIs that can be imported from lwc. It was not written with TypeScript in mind. We should update the rule to make working with TypeScript easier.

Options:

  1. Keep the current implementation, but add commonly used type and interface declarations.
  2. Allow any type or interface to be imported.
  3. Skip checking import type declarations (This would technically allow people to import the types for disallowed APIs. That's weird, though, and it still wouldn't allow them to use the disallowed APIs at runtime, so it shouldn't matter much.)
@wjhsf wjhsf added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant