How to inherit from the typing without inheriting the "any"? #2792
Unanswered
paul23-git
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
I am in the process of writing a (small) library to provide a more declarative way to describe diagrams, for react like environments.
Instead of pumping everything into a useEffect manually the goals is to have something like:
Now in that proces I was trying to specify the props for Link/Rect. Not wishing to completely reinvent the wheel myself, I Tried to make due with the types already supplied by jointjs:
shapes.standard.LinkAttributes
While this works, I also notice that all my typing stopped giving warnings when I used or gave unsupported attributes. Anything can be supplied and is then defined as "any".
I noticed that this is due to the typing from
dia.Cell.GenericAttributes
which has:Why is that is that line in there? Can we remove that when I inherit from that?
Steps to reproduce
a question...
Restrictions & Constraints
a question...
Does your question relate to JointJS or JointJS+. Select both if applicable.
JointJS
Beta Was this translation helpful? Give feedback.
All reactions