mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
49 lines
688 B
TypeScript
49 lines
688 B
TypeScript
//// [tests/cases/compiler/awaitLiteralValues.ts] ////
|
|
|
|
//// [awaitLiteralValues.ts]
|
|
function awaitString() {
|
|
await 'literal';
|
|
}
|
|
|
|
function awaitNumber() {
|
|
await 1;
|
|
}
|
|
|
|
function awaitTrue() {
|
|
await true;
|
|
}
|
|
|
|
function awaitFalse() {
|
|
await false;
|
|
}
|
|
|
|
function awaitNull() {
|
|
await null;
|
|
}
|
|
|
|
function awaitUndefined() {
|
|
await undefined;
|
|
}
|
|
|
|
|
|
//// [awaitLiteralValues.js]
|
|
"use strict";
|
|
function awaitString() {
|
|
yield 'literal';
|
|
}
|
|
function awaitNumber() {
|
|
yield 1;
|
|
}
|
|
function awaitTrue() {
|
|
yield true;
|
|
}
|
|
function awaitFalse() {
|
|
yield false;
|
|
}
|
|
function awaitNull() {
|
|
yield null;
|
|
}
|
|
function awaitUndefined() {
|
|
yield undefined;
|
|
}
|