I wanted to check whether a ClassDeclaration of a file a.ts implements an InterfaceDeclaration from a file b.ts using Compiler API. But I couldn't find a method or a function for it.
function isClassImplementInterface(
ts.ClassDeclaration: classDeclaration,
ts.InterfaceDeclaration: interfaceDeclaration
): boolean {
// return true if classDeclaration implements interfaceDeclaration correctly
}
Is there any function for it out of Compiler API?
checker.isTypeAssignableToafter you get the types of the class and the interface declaration.