--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: valid.jsonc --- # Input ```cjs function doSomething() { } ``` # Input ```cjs function doSomething() { function somethingElse() { } } ``` # Input ```cjs (function() { function doSomething() { } }()); ``` # Input ```cjs if (test) { const fn = function() { }; } ``` # Input ```cjs if (test) { const fn = function expr() { }; } ``` # Input ```cjs function decl() { var fn = function expr() { }; } ``` # Input ```cjs function decl(arg) { var fn; if (arg) { fn = function() { }; } } ``` # Input ```cjs function decl(arg) { var fn; if (arg) { fn = function expr() { }; } } ``` # Input ```cjs var x = {doSomething() {function doSomethingElse() {}}} ``` # Input ```cjs function decl(arg) { var fn; if (arg) { fn = function expr() { }; } } ``` # Input ```cjs if (test) { let x = 1; } ``` # Input ```cjs if (test) { const x = 1; } ``` # Input ```cjs var foo; ``` # Input ```cjs var foo = 42; ``` # Input ```cjs function doSomething() { var foo; } ``` # Input ```cjs (function() { var foo; }()); ``` # Input ```cjs foo(() => { function bar() { } }); ``` # Input ```cjs var fn = () => {var foo;} ``` # Input ```cjs var x = {doSomething() {var foo;}} ``` # Input ```cjs exports.foo = () => {} ``` # Input ```cjs exports.foo = function(){} ``` # Input ```cjs module.exports = function foo(){} ``` # Input ```cjs class C { method() { function foo() {} } } ``` # Input ```cjs class C { method() { var x; } } ``` # Input ```cjs class C { static { var x; } } ```