ConnectionLine props are mistyped #457
-
| Hello, <template>
  <div style="height: 700px; width: 900px; background-color: #1e1e1e">
    <VueFlow>
      <template #node-custom="props">
        <CustomNode :data="props.data" :id="props.id" :position="props.position" />
      </template>
      <template #edge-custom="props">
        <CustomEdge
          v-bind="props"
          :segments="target.segments"
          :updateOnDrag="target.updateOnDrag"
        />
      </template>
      <template #connection-line="{ sourceX, sourceY, targetX, targetY }"> <!-- Property 'targetY' does not exist on type '{}' -->
        <CustomConnection
          :source-x="sourceX"
          :source-y="sourceY"
          :target-x="targetX"
          :target-y="targetY"
          :color="connectionColor"
        />
      </template>
    </VueFlow>
  </div>
</template>While it is working in  | 
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
| Interesting. Are you using the Volar VSCode extension for Vue? Looks like I need to somehow type the slot props (which I didn't know was even possible currently, so I assumed they're all typed as  You could try this for now:  <ConnectionLine :target-x="(props as ConnectionLineProps).targetX" />
 | 
Beta Was this translation helpful? Give feedback.

Interesting. Are you using the Volar VSCode extension for Vue?
I can see the problem if I open the example in VSCode as well (using Volar).
Looks like I need to somehow type the slot props (which I didn't know was even possible currently, so I assumed they're all typed as
any😅)You could try this for now:
ConnectionLinePropsare an exported type of@vue-flow/core