Replies: 4 comments 3 replies
-
I realised it also prevents the use use of inline inputs. such as: const outputValue = output(
passthrough({
inputValue: input({
title: "Value",
type: "string",
default: "Hello, World!",
}),
}).outputs.inputValue
); |
Beta Was this translation helpful? Give feedback.
-
ok. these are the causes. this much hand holding is getting in the way of actually writing a board. breadboard/packages/build/src/internal/board/serialize.ts Lines 266 to 269 in 6ada218 breadboard/packages/build/src/internal/board/serialize.ts Lines 386 to 389 in 6ada218 If the input or output has been declared and is part of the graph, it will be emitted with the serialisation. This " strict " behaviour should be behind a flag that is explicitly enabled.
|
Beta Was this translation helpful? Give feedback.
-
Also I think using |
Beta Was this translation helpful? Give feedback.
-
Hello! The reason you have to tell the board function about your inputs directly is that it allows TypeScript to understand at compile time what the signature of the board definition is. That's important because in addition to being able to serialize a board definition, you can also call it as a function, giving you an instance which you can then use like a node within another board (caveat: this way of composing/nesting boards isn't actually fully supported yet, but it's on my radar and I plan to make it work soon). And we want to be able to validate at compile time that the inputs and outputs of those nodes are correctly typed. If you want multiple input nodes, you can set the Hope that helps, let me know if anything is unclear or you have more questions. I will also prioritize expanding the documentation. |
Beta Was this translation helpful? Give feedback.
-
It seems unnecessary to have to explicitly pass all of the inputs and outputs to the board function.
Before, as long as a node that was part of the graph was serialised, you got the whole graph.
example of all inputs and outputs explicitly having to be passed to the
board
build
functionexamples with old serialisation method
Beta Was this translation helpful? Give feedback.
All reactions