mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
402 B
TypeScript
19 lines
402 B
TypeScript
//// [tests/cases/compiler/castOfYield.ts] ////
|
|
|
|
//// [castOfYield.ts]
|
|
function* f() {
|
|
<number> (yield 0);
|
|
// Unlike await, yield is not allowed to appear in a simple unary expression.
|
|
<number> yield 0;
|
|
}
|
|
|
|
|
|
//// [castOfYield.js]
|
|
"use strict";
|
|
function* f() {
|
|
(yield 0);
|
|
// Unlike await, yield is not allowed to appear in a simple unary expression.
|
|
;
|
|
yield 0;
|
|
}
|