A pass that would diagnose when a custom element is recognized in source code but it hasn't be declared on the HTMLElementTagNameMap, or if it is declared with the wrong tag name. For example:
Warns:
import {customElement, LitElement} from 'lit-element';
@customElement('foo-bar')
class FooBar extends LitElement {}
// ~~~~~~ warning!
Warns:
import {customElement, LitElement} from 'lit-element';
@customElement('foo-bar')
class FooBar extends LitElement {}
declare global {
interface HTMLElementTagNameMap {
'fizz-buzz': FooBar;
// ~~~~~~~~~~~ warning!
}
}
Does not warn:
import {customElement, LitElement} from 'lit-element';
@customElement('foo-bar')
class FooBar extends LitElement {}
declare global {
interface HTMLElementTagNameMap {
'foo-bar': FooBar;
}
}