Commit e606762a authored by Clément's avatar Clément

update: 2nd parameter required

parent 24949d05
Pipeline #7311 passed with stage
in 3 minutes and 34 seconds
......@@ -12,7 +12,7 @@ export class Sib {
defineComponent(component.name, this.toElement(component));
}
protected static toElement(component: ComponentConstructorInterface): Function {
protected static toElement(component: ComponentConstructorInterface): typeof HTMLElement {
return class extends HTMLElement {
private _component: ComponentInterface | null = null;
......
......@@ -136,7 +136,7 @@ function findClosingBracketMatchIndex(str: string, pos: number) {
return -1;
}
function defineComponent(tagName: string, componentClass = class{}) {
function defineComponent(tagName: string, componentClass: typeof HTMLElement) {
if (!customElements.get(tagName)) {
customElements.define(tagName, componentClass);
} else {
......@@ -150,7 +150,7 @@ function defineComponent(tagName: string, componentClass = class{}) {
class extends componentClass {
constructor() {
console.warn(
`${sibTagName} is deprecated, please use ${tagName} insteed`,
`<${sibTagName}> is deprecated, please use <${tagName}> insteed`,
);
super();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment