You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interfaces used to be ignored,
which could be worked around by using abstract classes.
This is now not required anymore, as components will
be generated for interfaces as well.
Complex interfaces that are type-based (such as unions)
are still ignored.
thrownewError(`Failed to load super class ${superClassName} of ${classReference.localName} in ${classReference.fileName}:\n${(<Error>error).message}`);
48
+
if(classReferenceLoaded.type==='class'){
49
+
// If the class has a super class, load it recursively
thrownewError(`Failed to load super class ${superClassName} of ${classReference.localName} in ${classReference.fileName}:\n${(<Error>error).message}`);
62
+
}
63
+
if(superClassLoaded.type!=='class'){
64
+
thrownewError(`Detected non-class ${superClassName} extending from a class ${classReference.localName} in ${classReference.fileName}`);
this.logger.debug(`Ignored interface ${interfaceName} implemented by ${classReference.localName} in ${classReference.fileName}:\n${(<Error>error).message}`);
this.logger.debug(`Ignored interface ${interfaceName} extended by ${classReference.localName} in ${classReference.fileName}:\n${(<Error>error).message}`);
106
+
return;
107
+
}
108
+
if(superInterface.type!=='interface'){
109
+
thrownewError(`Detected non-interface ${classReferenceLoaded.localName} extending from a class ${interfaceName} in ${classReference.fileName}`);
// Extensions in the form of `interface A extends B`
54
58
returnextendsExpression.expression.name;
55
59
}
56
-
thrownewError(`Could not interpret type of super interface in ${fileName} on line ${extendsExpression.loc.start.line} column ${extendsExpression.loc.start.column}`);
57
-
});
60
+
// Ignore interfaces that we don't understand
61
+
this.logger.debug(`Ignored an interface expression of unknown type ${extendsExpression.expression.type} on ${declaration.id.name}`);
62
+
})
63
+
.filter(iface=>Boolean(iface));
64
+
}
65
+
66
+
/**
67
+
* Find the interface names of the given class.
68
+
* @param declaration A class declaration.
69
+
* @param fileName The file name of the current class.
thrownewError(`Could not interpret the implements type on a class in ${fileName} on line ${implement.expression.loc.start.line} column ${implement.expression.loc.start.column}`);
0 commit comments