aurelienbrabant
aurelienbrabant17mo 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
rubenf17mo ago
Just add a type On the parameter
aurelienbrabant
aurelienbrabantOP17mo ago
Wdym? The type is ConfigType here
rubenf
rubenf17mo ago
Sorry I misread, I was biking. I'm back, I will add support right now 🙂 Shouldn't take very long
aurelienbrabant
aurelienbrabantOP17mo ago
No problem, amazing 🙂
rubenf
rubenf17mo ago
done in latest @aurelienbrabant also work with default arg will deploy in 10mins
aurelienbrabant
aurelienbrabantOP17mo ago
Very nice I will update soon thank you 🙏