11 lines
484 B
Plaintext
11 lines
484 B
Plaintext
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;
|
|
} |