mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
756 B
Plaintext
14 lines
756 B
Plaintext
FunctionDeclaration7_es6.ts(3,20): error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
|
FunctionDeclaration7_es6.ts(3,20): error TS7057: 'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation.
|
|
|
|
|
|
==== FunctionDeclaration7_es6.ts (2 errors) ====
|
|
function*bar() {
|
|
// 'yield' here is an identifier, and not a yield expression.
|
|
function*foo(a = yield) {
|
|
~~~~~
|
|
!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer.
|
|
~~~~~
|
|
!!! error TS7057: 'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation.
|
|
}
|
|
} |