angular/packages/compiler-cli/test/compliance/test_cases/signal_inputs
Kristiyan Kostadinov 5a80a48e96 fix(compiler-cli): avoid allocating an object for signals in production mode
Currently when the signal debug name transform sees something like `const foo = signal(0);`, it transforms the signal into `signal(0, {...(ngDevMode ? { debugName: 'foo' } : {})})`. After minification this becomes `signal(0, {})` which will allocate memory for the empty object literal.

These changes rework the logic to produce `signal(0, ...(ngDevMode ? [{ debugName: 'foo' }] : []))` which will be fully tree shaken away to `signal(0)`.

(cherry picked from commit e30e61b789)
2025-12-02 15:06:55 +01:00
..
complex_transform_functions.js refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
complex_transform_functions.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
GOLDEN_PARTIAL.js fix(compiler-cli): avoid allocating an object for signals in production mode 2025-12-02 15:06:55 +01:00
input_component_definition.js fix(compiler): output input flags as a literal (#55215) 2024-04-04 11:13:52 -07:00
input_component_definition.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
input_directive_definition.js refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
input_directive_definition.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
mixed_input_types.js refactor(compiler): remove input transforms feature (#59980) 2025-02-18 19:27:59 +00:00
mixed_input_types.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
TEST_CASES.json feat(compiler-cli): add experimental support for fast type declaration emission (#61334) 2025-05-14 14:07:37 -07:00
transform_not_captured.js refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
transform_not_captured.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00