11 lines
180 B
TypeScript
11 lines
180 B
TypeScript
|
// @target: esnext
|
||
|
// @noImplicitReturns: true
|
||
|
// @strictNullChecks: false
|
||
|
|
||
|
function* testGenerator () {
|
||
|
if (Math.random() > 0.5) {
|
||
|
return;
|
||
|
}
|
||
|
yield 'hello';
|
||
|
}
|