Comments (6)
Please provide an actually runnable reproduction. I can't see the error from the provided link.
from core.
Please provide an actually runnable reproduction. I can't see the error from the provided link.
This problem must import any third Package which contains interface declaration, thus I can't supply a runable demo. Please Copy code to local to reproduction this.
from core.
https://vuejs.org/api/sfc-script-setup.html#type-only-props-emit-declarations
The latest version of Vue supports referencing imported and a limited set of complex types in the type parameter position. However, because the type to runtime conversion is still AST-based, some complex types that require actual type analysis, e.g. conditional types, are not supported. You can use conditional types for the type of a single prop, but not the entire props object.
from core.
In my project, I have many sub components(50+) which have the same props option, so I wan't to reuse entire props object, so I can reduce 98% coding of props object declaration, It's really useful in dynamic imported components seceneries.
SO: Will vue support this secenary, and when? Looking forward to it.
from core.
try https://github.com/so1ve/vue.ts/tree/main/packages/complex-types
from core.
Related Issues (20)
- Not possible to use Symbol values for checkbox v-model values HOT 3
- Change in computed property behavior with Reactive objects in 3.4 HOT 3
- `app.provide` is not type safe
- UModal error when opened HOT 1
- Invalid bidirectional binding of subcomponent ref HOT 2
- Cannot read properties of null (reading 'insertBefore') HOT 2
- Vue compat with Jest: "TypeError: decode_js.EntityDecoder is not a constructor" HOT 2
- MutationObserver in defineCustomElement is disconnected if we move the custom element to another place, then lose attribute observation
- Input with type="number" does not update value after removing leading zeros from v-model binding HOT 1
- Formerly functional project is now broken HOT 2
- KeepAlive + Transition + v-if 同时使用时会导致时会导致内存泄漏的2个bug HOT 6
- Cannot dynamically assign new property to $options object in vue/compat
- Agree with you. For vue2 I am going to have an issue no ? how can I an make both working good ? HOT 2
- Incorrect type error with kebab-cased "aria-*" props HOT 4
- 导入类型时省略.tsx后缀,在defineProps<>中使用导入的类型,会提示Failed to resolve import source "xxxx" HOT 4
- Two-way binding not working when using reactive, must use Ref HOT 6
- vue3中,想用ts类来开发组件,现在遇到个问题,如何定义ref HOT 4
- Computed generic type stripping ruin the type strictness HOT 1
- Using generic component with typed slots (defineSlots) in non-setup component breaks types
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 core.