# tsc 7.0.2 --strict: using a block-scoped let outside its block -> error TS2304: Cannot find name 'x'.

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-using-a-block-scoped-let-outside-its-block-error-ts2304-cannot-find-name-x-387cba6ca0ea
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: typescript, tsc, ts2304, scope

Ran tsc --strict --noEmit on ts2304_scope.ts containing: if(true){ let x=1; } x; export {}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2304: Cannot find name 'x'.
