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

[gen-ts-declarations] Transitive mixins from external packages are not discovered #3505

Open
web-padawan opened this issue May 18, 2020 · 1 comment
Labels

Comments

@web-padawan
Copy link
Contributor

The following code results in a warning and does not produce correct output.

import { DirMixin } from '@vaadin/vaadin-element-mixin/vaadin-dir-mixin.js';

/**
 * @polymerMixin
 * @mixes DirMixin
 */
export const ItemMixin = superClass => class VaadinItemMixin extends DirMixin(superClass) {
  // mixin contents
}

Warning

export const ItemMixin = superClass => class VaadinItemMixin extends DirMixin(superClass) {
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning [GEN_TYPESCRIPT_DECLARATIONS_WARNING] - Found 0 features for mixin DirMixin, expected 1.

Expected Output

declare function ItemMixin<T extends new (...args: any[]) => {}>(base: T): T & ItemMixinConstructor & DirMixinConstructor;

interface ItemMixin extends DirMixin {
  // mixin contents
}

Actual Output

declare function ItemMixin<T extends new (...args: any[]) => {}>(base: T): T & ItemMixinConstructor;

interface ItemMixin {
  // mixin contents
}

Note

I was able to track this down to this method call:

And now I feel like 3rd party mixins are not picked up by analyzePackage() 🤔

@aomarks any suggestions?

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 2, 2021
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