Comments (3)
An easy workaround would be that we write the d.ts
ourselves, instead of using the generated one.
from vike-vue.
An easy workaround would be that we write the
d.ts
ourselves, instead of using the generated one.
Could you elaborate?
My thinking was doing something along these lines
ClientOnly.vue
<script lang="ts" setup generic="T">
type Props = {
load: T
}
type ForwardProps = Awaited<ReturnValue<T>>["props"] // this isn't correct, I don't know how to get the props of the loaded component as of now
defineProps<Props & ForwardProps>()
</script>
The main problem here is that we have a dynamic import, so I don't think I can just use the return value here. I have yet to try this out though.
from vike-vue.
I don't know much about Vue's TypeScript support but, in principle, if we manually create the .d.ts
file for ClientOnly
ourselfes then that should work (assuming SFC's TypeScript support is "lossless").
I guess the question boils down to that: can we make it work when the user doesn't use SFC? If yes and if SFC TypeScript is lossless, then we're good.
from vike-vue.
Related Issues (20)
- Wrong data in `useData` after client side navigation HOT 15
- Possible leftover properties in `pageContextReactive` after `pageChange` HOT 11
- Write docs for `vike-vue-pinia` and `vike-vue-query` HOT 1
- Sell vike-vue + JSX? HOT 1
- vikeVuePinia causes error HOT 4
- using pinia-plugin-persistedstate with js cookie HOT 2
- Action Required: Fix Renovate Configuration
- Updating `lang` on client-side navigation
- Register plugins that don't use `app.use` HOT 5
- I can't get working examples HOT 3
- (Re-)introduce fine-grained head settings HOT 14
- Client side routing with catch all page throwing error HOT 4
- `clientOnly()` function instead of `<ClientOnly>` wrapper component HOT 29
- Progressive Rendering HOT 11
- Nuxt Comparison HOT 4
- Support for `teleports` with Vue SSR HOT 29
- Improve hooks? HOT 20
- Export Vike configuration at `/config`
- Release `vike-vue-{pinia,query}@0.1.0`? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vike-vue.