TsSimpleAst
Interface Declarations
Interface declarations can be retrieved from source files, namespaces, or function bodies:
const interfaces = sourceFile.getInterfaces();
const interface1 = sourceFile.getInterface("Interface1");
const firstInterfaceWith5Properties = sourceFile.getInterface(i => i.getProperties().length === 5);
Get extends expressions
const extendsExpressions = interfaceDeclaration.getExtendsExpressions();
Will return ExpressionWithTypeArguments[].
Get method signatures
Use:
const methodSignatures = interfaceDeclaration.getMethods();
Get properties
Use:
const properties = interfaceDeclaration.getProperties();
Get new signatures
TODO: Not implemented yet.