export function foo() {
const _fn = () => {
;(() => numFilesSelected)()
}
const numFilesSelected = 1
}
No error.
test.tsx:3:13 - error TS2448: Block-scoped variable 'numFilesSelected' used before its declaration.
3 ;(() => numFilesSelected)()
~~~~~~~~~~~~~~~~
test.tsx:6:9 - 'numFilesSelected' is declared here.
6 const numFilesSelected = 1
~~~~~~~~~~~~~~~~
Steps to reproduce
Behavior with
typescript@5.9No error.
Behavior with
tsgo