feat: Default literal

This commit is contained in:
cha0s 2020-06-22 17:09:27 -05:00
parent 08735f27d8
commit a545ce693a

View File

@ -129,10 +129,19 @@ const defaultInvocation = (context, steps) => {
const {args = []} = funcDescription;
return {
type: 'invoke',
args: args.map(() => ({
type: 'literal',
value: '',
})),
args: args.map(([, {type}]) => {
const {defaultLiteral} = Context.typeDescription(type, undefined);
if (defaultLiteral) {
return ({
type: 'literal',
value: defaultLiteral,
});
}
return ({
type: 'literal',
value: {work: {in: 'progress'}},
});
}),
};
};