// @target: esnext // https://github.com/Microsoft/TypeScript/issues/26586 function normalFunc(p: Promise) { for await (const _ of []); return await p; } export function exportedFunc(p: Promise) { for await (const _ of []); return await p; } const functionExpression = function(p: Promise) { for await (const _ of []); await p; } const arrowFunc = (p: Promise) => { for await (const _ of []); return await p; }; function* generatorFunc(p: Promise) { for await (const _ of []); yield await p; } class clazz { constructor(p: Promise) { for await (const _ of []); await p; } method(p: Promise) { for await (const _ of []); await p; } } for await (const _ of []); await null;