-
When trying to use the examples from the readme, it still only allows the primitives, so I get: " breadboard/packages/build/README.md Lines 101 to 109 in a20538f this is a (currently invalid) sample of what I was attempting. without the export const entries = defineNodeType({
inputs: {
object: {
type: "object",
description: "The object to get entries from",
},
},
outputs: {
entries: {
type: "array",
description: "The entries of the object",
primary: true,
},
},
invoke: ({ object }) => {
return {
entries: Object.entries(object),
};
},
}); |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I think you just need to sync with |
Beta Was this translation helpful? Give feedback.
-
Leaving these here for reference export const popNodeType = defineNodeType({
inputs: {
array: {
type: array("unknown"),
},
},
outputs: {
last: {
type: "unknown",
},
array: {
type: array("unknown"),
},
},
invoke: <T>(inputs: { array: T[] }): { last: T | undefined; array: T[] } => {
const { array } = inputs;
const last = array.pop();
return {
last,
array,
};
},
}); const popNodeHandler: NodeHandler = {
invoke: <T>({
array,
}: {
array: T[];
}): Promise<{ last: T | undefined; array: T[] }> => {
const last = array.pop();
return Promise.resolve({
last,
array,
});
},
}; |
Beta Was this translation helpful? Give feedback.
we edge closer.
to export, I need to type the const. though I can't figure out the correct config for theMonomorphicDefinition
generics.scratch that. I think I've got it