aurelienbrabant
aurelienbrabant15mo ago

Object destructuring unparsable in main function

export interface ConfigType {
key: string;
}

export async function main({ key }: ConfigType) {
}
export interface ConfigType {
key: string;
}

export async function main({ key }: ConfigType) {
}
The following code causes windmill to error since it's unable to parse the main function's signature. This happens because of the object destructuring that's taking place. Probably a rightful wontdo but felt like I should also report this one.
6 Replies
rubenf
rubenf15mo ago
Just add a type On the parameter
aurelienbrabant
aurelienbrabant15mo ago
Wdym? The type is ConfigType here
rubenf
rubenf15mo ago
Sorry I misread, I was biking. I'm back, I will add support right now 🙂 Shouldn't take very long
aurelienbrabant
aurelienbrabant15mo ago
No problem, amazing 🙂
rubenf
rubenf15mo ago
done in latest @aurelienbrabant also work with default arg will deploy in 10mins
aurelienbrabant
aurelienbrabant15mo ago
Very nice I will update soon thank you 🙏