Skip to content

How to get PropertyDeclaration's from extends. #1619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Hugos68 opened this issue Mar 7, 2025 · 0 comments
Open

How to get PropertyDeclaration's from extends. #1619

Hugos68 opened this issue Mar 7, 2025 · 0 comments

Comments

@Hugos68
Copy link

Hugos68 commented Mar 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant