ts-morph
ts-morph copied to clipboard
How to get `PropertyDeclaration`'s from `extends`.
Let's say I have:
interface InterfaceOne {
propertyOne: string
}
interface InterfaceTwo extends InterfaceOne {
propertyTwo: string
}
const interface = sourceFile.getInterface("interfaceTwo")
console.log(interface.getProperties().length) // 1
How can I get all properties, including those that are extended from? Use case: We're building automated documentation and need to extract all properties (including extended one's) to document them.