mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
12 lines
421 B
Plaintext
12 lines
421 B
Plaintext
blockScopedFunctionDeclarationStrictES6.ts(6,1): error TS2304: Cannot find name 'foo'.
|
|
|
|
|
|
==== blockScopedFunctionDeclarationStrictES6.ts (1 errors) ====
|
|
"use strict";
|
|
if (true) {
|
|
function foo() { } // Allowed to declare block scope function
|
|
foo(); // This call should be ok
|
|
}
|
|
foo(); // Cannot find name since foo is block scoped
|
|
~~~
|
|
!!! error TS2304: Cannot find name 'foo'. |