Skip to content

no-unsafe-references false positive from TypeScript types #214

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

Closed
joshkel opened this issue Feb 16, 2024 · 1 comment
Closed

no-unsafe-references false positive from TypeScript types #214

joshkel opened this issue Feb 16, 2024 · 1 comment
Labels

Comments

@joshkel
Copy link
Contributor

joshkel commented Feb 16, 2024

The following code triggers a no-unsafe-references warning starting in 1.1.x:

import type { Store } from 'redux';

  async dispatch(action: any) {
    return this.page.evaluate((action) => {
      const store = (window as any).__redux_store as Store;
      store.dispatch(action);
    }, action);
  }

Since this is only a typecast / type reference, it doesn't exist at runtime, and the plugin should not raise a warning.

Copy link

🎉 This issue has been resolved in version 1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

1 participant