2016-10-12 21:28:11 +02:00
|
|
|
// @target: es2017
|
2016-10-06 00:41:22 +02:00
|
|
|
// @lib: es2017
|
|
|
|
// @noEmitHelpers: true
|
|
|
|
|
|
|
|
async (): Promise<void> => {
|
|
|
|
await 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
async function asyncFunc() {
|
|
|
|
await 0;
|
|
|
|
}
|
|
|
|
|
2016-10-15 01:16:11 +02:00
|
|
|
const asyncArrowFunc = async (): Promise<void> => {
|
2016-10-06 00:41:22 +02:00
|
|
|
await 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
async function asyncIIFE() {
|
|
|
|
await 0;
|
|
|
|
|
|
|
|
await (async function(): Promise<void> {
|
|
|
|
await 1;
|
|
|
|
})();
|
|
|
|
|
|
|
|
await (async function asyncNamedFunc(): Promise<void> {
|
|
|
|
await 1;
|
|
|
|
})();
|
|
|
|
|
|
|
|
await (async (): Promise<void> => {
|
|
|
|
await 1;
|
|
|
|
})();
|
|
|
|
}
|
|
|
|
|
|
|
|
class AsyncClass {
|
|
|
|
asyncPropFunc = async function(): Promise<void> {
|
|
|
|
await 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
asyncPropNamedFunc = async function namedFunc(): Promise<void> {
|
|
|
|
await 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
asyncPropArrowFunc = async (): Promise<void> => {
|
|
|
|
await 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
async asyncMethod(): Promise<void> {
|
|
|
|
await 2;
|
|
|
|
}
|
|
|
|
}
|