Files
tsgo/testdata/baselines/reference/submodule/compiler/blockScopedFunctionDeclarationStrictES5(target=es2015).errors.txt

12 lines
402 B
Plaintext

blockScopedFunctionDeclarationStrictES5.ts(6,1): error TS2304: Cannot find name 'foo'.
==== blockScopedFunctionDeclarationStrictES5.ts (1 errors) ====
"use strict";
if (true) {
function foo() { } // Error to declare function in block scope
foo(); // This call should be ok
}
foo(); // Error to find name foo
~~~
!!! error TS2304: Cannot find name 'foo'.