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
Add maxNodeModuleJsDepth to the default lit-analyzer tsconfig #122
Comments
Thanks for reporting this, and thanks for the great explanation :-) TLDR: You can fix this pretty easily by adding First of all /**
* @customElement pwa-install-button
*/
export class PwaInstallButton extends HTMLElement {
} But you don't need that, because actually there is no problem with the Your problem comes from another, more essential, challenge which affects how to consume/analyze dependencies. I described this in details in your other issue here. In your file For libraries where the author doesn't ship type definition files and for projects that don't use a
Until some of this has been implemented, you can either chose to add Muting the warning:
Telling lit-analyzer that the tag names exist
|
Wow, thanks for this complete explanation! 👏 I have two questions:
import { PwaInstallButton } from 'pwa-helper-components/pwa-install-button/PwaInstallButton.js';
import { PwaUpdateAvailable } from 'pwa-helper-components/pwa-update-available/PwaUpdateAvailable.js';
declare global {
interface HTMLElementTagNameMap {
'pwa-install-button': PwaInstallButton;
'pwa-update-available': PwaUpdateAvailable;
}
} |
The implication is that I think both of the methods are equally fine, and it really depends on if you want to type the elements yourself (for example, add some properties to the The reason you get declare module "pwa-helper-components/pwa-install-button/PwaInstallButton.js" {
/**
* @fires {CustomEvent<boolean>} pwa-installable
* @fires {CustomEvent<boolean>} pwa-installed
*/
export class PwaInstallButton {}
} Or you can choose to just use declare global {
interface HTMLElementTagNameMap {
'pwa-install-button': HTMLElement;
}
} |
Is it okay for you if I change the title of this issue to something like: "Add |
After reading the
no-unknown-tag-name
rule...What's the way to add the "@CustomElement tag-name" JSDoc?
Right now I have this issue (IBM/pwa-lit-template#12) with this components (pwa-helper-components).
Another reference: thepassle/pwa-helpers#12
If I update this file:
https://github.com/thepassle/pwa-helpers/blob/8a761a5ea11e29e44c986c6eb2f8f26b5acdd197/pwa-install-button.js#L1-L3
To be like:
Should be enough? I can't get it to work.
The text was updated successfully, but these errors were encountered: