fixed some type mismatches with default values
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
interface $$Props extends NodeProps {}
|
||||
|
||||
export let data: $$Props['data'] = { label: 'Node' };
|
||||
export let targetPosition: $$Props['targetPosition'] = Position.Top;
|
||||
export let sourcePosition: $$Props['sourcePosition'] = Position.Bottom;
|
||||
export let targetPosition: $$Props['targetPosition'] = undefined;
|
||||
export let sourcePosition: $$Props['sourcePosition'] = undefined;
|
||||
|
||||
// this is a workaround for suppressing the warning about unused props
|
||||
$$restProps;
|
||||
</script>
|
||||
|
||||
<Handle type="target" position={targetPosition} />
|
||||
<Handle type="target" position={targetPosition ?? Position.Top} />
|
||||
{data?.label}
|
||||
<Handle type="source" position={sourcePosition} />
|
||||
<Handle type="source" position={sourcePosition ?? Position.Bottom} />
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
interface $$Props extends NodeProps {}
|
||||
|
||||
export let data: $$Props['data'] = { label: 'Node' };
|
||||
export let sourcePosition: $$Props['sourcePosition'] = Position.Bottom;
|
||||
export let sourcePosition: $$Props['sourcePosition'] = undefined;
|
||||
|
||||
// this is a workaround for suppressing the warning about unused props
|
||||
$$restProps;
|
||||
</script>
|
||||
|
||||
{data?.label}
|
||||
<Handle type="source" position={sourcePosition} />
|
||||
<Handle type="source" position={sourcePosition ?? Position.Bottom} />
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
interface $$Props extends NodeProps {}
|
||||
|
||||
export let data: $$Props['data'] = { label: 'Node' };
|
||||
export let targetPosition: $$Props['targetPosition'] = Position.Top;
|
||||
export let targetPosition: $$Props['targetPosition'] = undefined;
|
||||
|
||||
// this is a workaround for suppressing the warning about unused props
|
||||
$$restProps;
|
||||
</script>
|
||||
|
||||
{data?.label}
|
||||
<Handle type="target" position={targetPosition} />
|
||||
<Handle type="target" position={targetPosition ?? Position.Top} />
|
||||
|
||||
Reference in New Issue
Block a user