-
Notifications
You must be signed in to change notification settings - Fork 343
-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert TSX using TypeScript(ts-loader) #428
Comments
Change to And BTW, that's an interesting usage, and thanks for sharing. If you would like to make it general for people to use (a lib or even just a guide), please let me know! :) |
Ok, I will try to convert the Now, I'm having a problem with props type, can you help me see ? The problem manifests as: passing non-existent properties on the component will not raise any errors References: Code: Thanks!!! |
Hi. @antfu I used the weekend time to read the type file of composition-api, found the following problems:
Also, should |
Also, there seems to be no definition of |
@piecego
You are right, I will fix it.
Nice catch-up, I think we should copy the type from vue-next and test out:
It's probably for toolchains/vetur to infer the type.
This is on purpose, as the refs are not there in Vue 3. We expose it as a temporary workaround, you can found more in the README Thanks for looking into it and they're pretty helpful! |
Because it returns |
Hi, I converted TSX by configuring the
jsx
andjsxFactory
properties of the tsconfig.json fileI copied the
h
function todefineComponent
in the following wayNow TSX conversion is successful, but the top node information is lost, such as
id
Here has a simple code example https://github.com/piecego/vue-composition-api-tsx-example.git
Please help me see why, and whether this method can be used instead of babel for conversion?
Thanks!!!
The text was updated successfully, but these errors were encountered: