`joint.dia.Element.Port` interface does not include `position`

This issue has been tracked since 2022-03-10.

Reproduction: Add typing to example from ports tutorial

import * as joint from 'jointjs';

const portsOut: joint.dia.Element.Port = {
    position: {
        name: 'right'
    },
    attrs: {
        portBody: {
            magnet: true,
            r: 10,
            fill: '#E6A502',
            stroke:'#023047'
        }
    },
    label: {
        position: {
            name: 'right',
            args: { y: 6 }
        },
        markup: [{
           // Markup
        }]
    },
    markup: [{
        // Markup
    }]
};

Typescript error: Object literal may only specify known properties, and 'position' does not exist in type 'Port'.

dirthsj wrote this answer on 2022-03-10

Closed: Was using the wrong interface (joint.dia.Element.PortGroup is the correct one)

More Details About Repo
Owner Name clientIO
Repo Name joint
Full Name clientIO/joint
Language JavaScript
Created Date 2009-09-11
Updated Date 2022-12-03
Star Count 3715
Watcher Count 155
Fork Count 817
Issue Count 51

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date