Примером может быть:
Пример. vue ...
<template>
</template>
<script>
export default {
name: 'ExampleComponent'
props: {
name: {
type: String
},
age: {
type: Number
}
}
}
</script>
example.ts
import Vue from 'vue'
const readMyProp = <T extends Vue>(Component: T, compsProps: ComponentOptions<T> ??????) => {
....snipp....
}
useFile.ts / creationFile. vue
import ExampleVue from 'example.vue'
readMyProp(ExampleVue, {..autocompleteMe :) })
Я знаю, что это возможно с React / TS, но как насчет Vue? Мы уже там?