Open
Description
The bindgen code has a leftover todo that breaks async export generation for all world interface exports:
E.g. if I generate code for the following wit
package example:node-fetch;
interface simple-request {
record response {
/// User-provided name for a request
url: string,
/// Response body, converted to JSON
response-json: string,
}
/// This function performs a GET request
/// to the provided URL without supplying an query parameters or a body
get-json: func(url: string) -> response;
}
world component {
export simple-request;
}
Using
jco types wit-generated --async-mode jspi --async-wasi-exports --async-exports 'example:node-fetch/simple-request#get-json' -o src/generated
The generated export is
/** @module Interface example:node-fetch/simple-request **/
export function getJson(url: string): Response;
export interface Response {
url: string,
responseJson: string,
}
instead of the expected async code