is there a way to make op.inObject type safe? #922
Answered
by
steam0r
Joscha95
asked this question in
Answers & Questions
-
like this opinput always has to have an object of type = {id:string, value: number} |
Beta Was this translation helpful? Give feedback.
Answered by
steam0r
Nov 20, 2024
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Joscha95
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
op.inObject("Audio In", null, "audioNode")
will not let you connect port of different "type" (than "audioNode") to the port, cables will always allow connection port that have no type to ports that have one.you are suggesting validating the structure of an object, right?
for your custom ops you could decide on some structure and then add "myObject" as a parameter to your own inObject.