Retreiving library data programmatically

Is there a way to find which library a component is from programmatically in TypeScript?
Is there something similar that might help?