I tried this last week myself
Is there a way to get type/variable-name checking within the (j,t)sx part?
import { defineComponent } from '@vue/composition-api'; import type { VNode } from 'vue'; export default defineComponent({ name: 'ComponentName', props: { label: String }, render(): VNode { return <div>{ this.lable }</div>; } });
So in this example I misspelled label in the render function, but TSX doesn't provide me an error for that :(
label
render
Seems I need at least something like this
interface Data { label: string; } export default defineComponent<unknown, Data, Data>( //...
Then this.lable is an error
this.lable
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I tried this last week myself
Is there a way to get type/variable-name checking within the (j,t)sx part?
So in this example I misspelled
label
in therender
function, but TSX doesn't provide me an error for that :(Seems I need at least something like this
Then
this.lable
is an error