Hello,
There seems to be at least a typing error in the geoprocessor rest.
When I submit an async geoprocess like below:
const jobSubmitted = await submitJob(url, params);
fetchResultData(jobId: string, resultName: string, requestOptions?: any, Promise<supportParameterValue>;
const output = await jobSubmitted.fetchResultData(jobId, resultName);
const output = await (jobSubmitted as any).fetchResultData(resultName);
Yeah, this was an error in the doc and typings. Your workaround is correct. The doc will be updated in a couple of weeks. If there are enough typings updates, we'll do an update for npm, unsure at the moment.