Let's say you are using a component that has been imported from elsewhere
<Animal species={animalSpecies} /> // species has a specific type
and you want to pass it a certain variable that you expect from somewhere else:
<script lang="ts">
import Animal from 'animals'
export let animalSpecies : ???
</script>
<Animal species={animalSpecies} />
One way to do this would be to go into the source file and find a way to import the type directly. But is it possible to retrieve the type directly from the component?
If there was a way, for example, to get the typeof like:
export let animalSpecies : ComponentType<Animal.species>