11 lines
No EOL
484 B
Text
11 lines
No EOL
484 B
Text
tests/cases/compiler/optionalParamReferencingOtherParams2.ts(2,29): error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it.
|
|
|
|
|
|
==== tests/cases/compiler/optionalParamReferencingOtherParams2.ts (1 errors) ====
|
|
var a = 1;
|
|
function strange(x = a, y = b) {
|
|
~
|
|
!!! error TS2373: Initializer of parameter 'y' cannot reference identifier 'b' declared after it.
|
|
var b = "";
|
|
return y;
|
|
} |