mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-13 07:28:03 -05:00
13 lines
260 B
TypeScript
13 lines
260 B
TypeScript
// test_output! 3
|
|
|
|
export default function main() {
|
|
function foo() {
|
|
return x; // During tdz, but this is ok. Functions are hoisted anyway.
|
|
}
|
|
|
|
const x = 3;
|
|
|
|
// It's the references that matter. This is ok because x is initialized.
|
|
return foo();
|
|
}
|